summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-26 10:21:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-26 10:21:26 -0700
commit1434b65731963207a4cc84bd87e6191e34321986 (patch)
tree07f58551b451675c2f85ebe88e5feb8971577d78 /mm/slub.c
parent4934ed888e6fe78d9d339471fb870819da911e8b (diff)
parent76994412f8e824e79a593d6777ec327d85f942b2 (diff)
downloadop-kernel-dev-1434b65731963207a4cc84bd87e6191e34321986.zip
op-kernel-dev-1434b65731963207a4cc84bd87e6191e34321986.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: ksize() abuse checks slob: Fix to return wrong pointer
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index a505a82..0987d1c 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2726,9 +2726,10 @@ size_t ksize(const void *object)
page = virt_to_head_page(object);
- if (unlikely(!PageSlab(page)))
+ if (unlikely(!PageSlab(page))) {
+ WARN_ON(!PageCompound(page));
return PAGE_SIZE << compound_order(page);
-
+ }
s = page->slab;
#ifdef CONFIG_SLUB_DEBUG
OpenPOWER on IntegriCloud