diff --git a/mm/slub.c b/mm/slub.c index de4ca2280..30b0bd125 100755 --- a/mm/slub.c +++ b/mm/slub.c @@ -4369,7 +4369,11 @@ size_t __ksize(const void *object) page = virt_to_head_page(object); if (unlikely(!PageSlab(page))) { +#ifdef CONFIG_BUG_ON_DATA_CORRUPTION + BUG_ON(!PageCompound(page)); +#else WARN_ON(!PageCompound(page)); +#endif return page_size(page); }