From 0fc6163cd6630a6dc7eb66cd4bd0c49e49c95698 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 3 May 2017 11:57:35 -0400 Subject: [PATCH] bug on !PageSlab && !PageCompound in ksize Signed-off-by: Daniel Micay Signed-off-by: anupritaisno1 --- mm/slub.c | 4 ++++ 1 file changed, 4 insertions(+) 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); }