[PATCH v2] mm: do not export ioremap_page_range symbol for external module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: zhong jiang <zhongjiang@xxxxxxxxxx>

Recently, I've found cases in which ioremap_page_range was used
incorrectly, in external modules, leading to crashes. This can be
partly attributed to the fact that ioremap_page_range is lower-level,
with fewer protections, as compared to the other functions that an
external module would typically call. Those include:

     ioremap_cache
     ioremap_nocache
     ioremap_prot
     ioremap_uc
     ioremap_wc
     ioremap_wt

...each of which wraps __ioremap_caller, which in turn provides a
safer way to achieve the mapping.

Therefore, stop EXPORT-ing ioremap_page_range.

Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx> 
Suggested-by: John Hubbard <jhubbard@xxxxxxxxxx>
---
 lib/ioremap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/ioremap.c b/lib/ioremap.c
index 86c8911..a3e14ce 100644
--- a/lib/ioremap.c
+++ b/lib/ioremap.c
@@ -144,4 +144,3 @@ int ioremap_page_range(unsigned long addr,
 
 	return err;
 }
-EXPORT_SYMBOL_GPL(ioremap_page_range);
-- 
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux