patch-2.4.21 linux-2.4.21/mm/slab.c
Next file: linux-2.4.21/mm/swapfile.c
Previous file: linux-2.4.21/mm/shmem.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
2003-06-13 07:51:39.000000000 -0700
- Orig file:
linux-2.4.20/mm/slab.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/mm/slab.c linux-2.4.21/mm/slab.c
@@ -989,6 +989,8 @@
* cache being allocated each time a module is loaded and unloaded, if the
* module doesn't have persistent in-kernel storage across loads and unloads.
*
+ * The cache must be empty before calling this function.
+ *
* The caller must guarantee that noone will allocate memory from the cache
* during the kmem_cache_destroy().
*/
@@ -1947,8 +1949,12 @@
name = cachep->name;
{
char tmp;
+ mm_segment_t old_fs;
+ old_fs = get_fs();
+ set_fs(KERNEL_DS);
if (__get_user(tmp, name))
name = "broken";
+ set_fs(old_fs);
}
seq_printf(m, "%-17s %6lu %6lu %6u %4lu %4lu %4u",
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)