MIPS: Fix __vmalloc() etc. on MIPS for non-GPL modules

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, April 12, 2010 - 7:59 pm

Gitweb:     http://git.kernel.org/linus/7b3e543ddb39b69b75c9c24bb54180eca152f541
Commit:     7b3e543ddb39b69b75c9c24bb54180eca152f541
Parent:     3d45285dd1ff4d4a1361b95e2d6508579a4402b5
Author:     Anton Altaparmakov <aia21@cam.ac.uk>
AuthorDate: Thu Mar 25 20:48:12 2010 +0000
Committer:  Ralf Baechle <ralf@linux-mips.org>
CommitDate: Mon Apr 12 17:26:21 2010 +0100

    MIPS: Fix __vmalloc() etc. on MIPS for non-GPL modules
    
    Commit b3594a089f1c17ff919f8f78505c3f20e1f6f8ce (lmo) rsp.
    351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 (kernel.org) break non-GPL modules
    that use __vmalloc() or any of the vmap(), vm_map_ram(), etc functions on
    MIPS.
    
    All those functions are EXPORT_SYMBOL() so are meant to be allowed to be
    used by non-GPL kernel modules.  These calls all take page protection as
    an argument which is normally a constant like PAGE_KERNEL.
    
    This commit causes all protection constants like PAGE_KERNEL to not be
    constants and instead to contain the GPL-only symbol _page_cachable_default.
    
    This means that all calls to __vmalloc(), vmap(), etc, cause non-GPL
    modules to fail to link with the complaint that they are trying to use the
    GPL-only symbol _page_cachable_default...
    
    Change EXPORT_SYMBOL_GPL(_page_cachable_default) to EXPORT_SYMBOL() for
    non-GPL modules that call __vmalloc(), vmap(), vm_map_ram() etc.
    
    Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
    Cc: Chris Dearman <chris@mips.com>
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: http://patchwork.linux-mips.org/patch/1084/
    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
 arch/mips/mm/cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index be8627b..12af739 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -133,7 +133,7 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address,
 }
 
 unsigned long _page_cachable_default;
-EXPORT_SYMBOL_GPL(_page_cachable_default);
+EXPORT_SYMBOL(_page_cachable_default);
 
 static inline void setup_protection_map(void)
 {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
MIPS: Fix __vmalloc() etc. on MIPS for non-GPL modules, Linux Kernel Mailing ..., (Mon Apr 12, 7:59 pm)