summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-12-06 20:36:41 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:34 -0800
commit138ae6631a3d6f86851dd53686fa88295d1398bd (patch)
tree72edbfcfdc0c5af53a9bc9ef5134ae8d90f13e88 /mm
parent20aa7b21b1cbd1aa3fbf5fc14da5f7484a61a824 (diff)
downloadlinux-138ae6631a3d6f86851dd53686fa88295d1398bd.tar.bz2
[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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 7b8e5d668586..86f5d6e995bb 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -103,12 +103,12 @@
#include <linux/module.h>
#include <linux/rcupdate.h>
#include <linux/string.h>
+#include <linux/uaccess.h>
#include <linux/nodemask.h>
#include <linux/mempolicy.h>
#include <linux/mutex.h>
#include <linux/rtmutex.h>
-#include <asm/uaccess.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/page.h>
@@ -2124,7 +2124,6 @@ kmem_cache_create (const char *name, size_t size, size_t align,
mutex_lock(&cache_chain_mutex);
list_for_each_entry(pc, &cache_chain, next) {
- mm_segment_t old_fs = get_fs();
char tmp;
int res;
@@ -2133,9 +2132,7 @@ kmem_cache_create (const char *name, size_t size, size_t align,
* destroy its slab cache and no-one else reuses the vmalloc
* area of the module. Print a warning.
*/
- set_fs(KERNEL_DS);
- res = __get_user(tmp, pc->name);
- set_fs(old_fs);
+ res = probe_kernel_address(pc->name, tmp);
if (res) {
printk("SLAB: cache with size %d has lost its name\n",
pc->buffer_size);