aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 9acb413858ac..b9f37cb0f2e6 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2558,8 +2558,12 @@ size_t ksize(const void *object)
2558 if (unlikely(object == ZERO_SIZE_PTR)) 2558 if (unlikely(object == ZERO_SIZE_PTR))
2559 return 0; 2559 return 0;
2560 2560
2561 page = get_object_page(object); 2561 page = virt_to_head_page(object);
2562 BUG_ON(!page); 2562 BUG_ON(!page);
2563
2564 if (unlikely(!PageSlab(page)))
2565 return PAGE_SIZE << compound_order(page);
2566
2563 s = page->slab; 2567 s = page->slab;
2564 BUG_ON(!s); 2568 BUG_ON(!s);
2565 2569