summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2007-02-10 01:42:52 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 10:51:16 -0800
commit6e40e73097a5e4ad1b9f92fa21757343fdd6a682 (patch)
tree63212795f46640de68a75cf10cfc96d5e9e0d365 /mm
parent66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff)
downloadlinux-3.10-6e40e73097a5e4ad1b9f92fa21757343fdd6a682.tar.gz
linux-3.10-6e40e73097a5e4ad1b9f92fa21757343fdd6a682.tar.bz2
linux-3.10-6e40e73097a5e4ad1b9f92fa21757343fdd6a682.zip
[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.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/mm/slab.c b/mm/slab.c
index c6100628a6e..aea1cd25314 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2814,19 +2814,11 @@ failed:
*/
static void kfree_debugcheck(const void *objp)
{
- struct page *page;
-
if (!virt_addr_valid(objp)) {
printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n",
(unsigned long)objp);
BUG();
}
- page = virt_to_page(objp);
- if (!PageSlab(page)) {
- printk(KERN_ERR "kfree_debugcheck: bad ptr %lxh.\n",
- (unsigned long)objp);
- BUG();
- }
}
static inline void verify_redzone_free(struct kmem_cache *cache, void *obj)