From: Andrew Morton Signed-off-by: Andrew Morton --- mm/slab.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff -puN mm/slab.c~slab-use-probe_kernel_address mm/slab.c --- a/mm/slab.c~slab-use-probe_kernel_address +++ a/mm/slab.c @@ -107,8 +107,8 @@ #include #include #include +#include -#include #include #include #include @@ -2112,7 +2112,6 @@ kmem_cache_create (const char *name, siz mutex_lock(&cache_chain_mutex); list_for_each_entry(pc, &cache_chain, next) { - mm_segment_t old_fs = get_fs(); char tmp; int res; @@ -2121,9 +2120,7 @@ kmem_cache_create (const char *name, siz * 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); _