diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2007-02-10 04:42:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:16 -0500 |
commit | 6e40e73097a5e4ad1b9f92fa21757343fdd6a682 (patch) | |
tree | 63212795f46640de68a75cf10cfc96d5e9e0d365 /mm | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) |
[PATCH] slab: remove broken PageSlab check from kfree_debugcheck
The PageSlab debug check in kfree_debugcheck() is broken for compound
pages. It is also redundant as we already do BUG_ON for non-slab pages in
page_get_cache() and page_get_slab() which are always called before we free
any actual objects.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -2814,19 +2814,11 @@ failed: | |||
2814 | */ | 2814 | */ |
2815 | static void kfree_debugcheck(const void *objp) | 2815 | static void kfree_debugcheck(const void *objp) |
2816 | { | 2816 | { |
2817 | struct page *page; | ||
2818 | |||
2819 | if (!virt_addr_valid(objp)) { | 2817 | if (!virt_addr_valid(objp)) { |
2820 | printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n", | 2818 | printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n", |
2821 | (unsigned long)objp); | 2819 | (unsigned long)objp); |
2822 | BUG(); | 2820 | BUG(); |
2823 | } | 2821 | } |
2824 | page = virt_to_page(objp); | ||
2825 | if (!PageSlab(page)) { | ||
2826 | printk(KERN_ERR "kfree_debugcheck: bad ptr %lxh.\n", | ||
2827 | (unsigned long)objp); | ||
2828 | BUG(); | ||
2829 | } | ||
2830 | } | 2822 | } |
2831 | 2823 | ||
2832 | static inline void verify_redzone_free(struct kmem_cache *cache, void *obj) | 2824 | static inline void verify_redzone_free(struct kmem_cache *cache, void *obj) |