diff options
author | Andrew Morton <akpm@osdl.org> | 2006-12-06 23:36:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:34 -0500 |
commit | 138ae6631a3d6f86851dd53686fa88295d1398bd (patch) | |
tree | 72edbfcfdc0c5af53a9bc9ef5134ae8d90f13e88 /mm | |
parent | 20aa7b21b1cbd1aa3fbf5fc14da5f7484a61a824 (diff) |
[PATCH] slab: use probe_kernel_address()
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -103,12 +103,12 @@ | |||
103 | #include <linux/module.h> | 103 | #include <linux/module.h> |
104 | #include <linux/rcupdate.h> | 104 | #include <linux/rcupdate.h> |
105 | #include <linux/string.h> | 105 | #include <linux/string.h> |
106 | #include <linux/uaccess.h> | ||
106 | #include <linux/nodemask.h> | 107 | #include <linux/nodemask.h> |
107 | #include <linux/mempolicy.h> | 108 | #include <linux/mempolicy.h> |
108 | #include <linux/mutex.h> | 109 | #include <linux/mutex.h> |
109 | #include <linux/rtmutex.h> | 110 | #include <linux/rtmutex.h> |
110 | 111 | ||
111 | #include <asm/uaccess.h> | ||
112 | #include <asm/cacheflush.h> | 112 | #include <asm/cacheflush.h> |
113 | #include <asm/tlbflush.h> | 113 | #include <asm/tlbflush.h> |
114 | #include <asm/page.h> | 114 | #include <asm/page.h> |
@@ -2124,7 +2124,6 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2124 | mutex_lock(&cache_chain_mutex); | 2124 | mutex_lock(&cache_chain_mutex); |
2125 | 2125 | ||
2126 | list_for_each_entry(pc, &cache_chain, next) { | 2126 | list_for_each_entry(pc, &cache_chain, next) { |
2127 | mm_segment_t old_fs = get_fs(); | ||
2128 | char tmp; | 2127 | char tmp; |
2129 | int res; | 2128 | int res; |
2130 | 2129 | ||
@@ -2133,9 +2132,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2133 | * destroy its slab cache and no-one else reuses the vmalloc | 2132 | * destroy its slab cache and no-one else reuses the vmalloc |
2134 | * area of the module. Print a warning. | 2133 | * area of the module. Print a warning. |
2135 | */ | 2134 | */ |
2136 | set_fs(KERNEL_DS); | 2135 | res = probe_kernel_address(pc->name, tmp); |
2137 | res = __get_user(tmp, pc->name); | ||
2138 | set_fs(old_fs); | ||
2139 | if (res) { | 2136 | if (res) { |
2140 | printk("SLAB: cache with size %d has lost its name\n", | 2137 | printk("SLAB: cache with size %d has lost its name\n", |
2141 | pc->buffer_size); | 2138 | pc->buffer_size); |