From: Eric Dumazet Date: Thu, 3 Sep 2009 14:08:06 +0000 (+0200) Subject: slub: fix slab_pad_check() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a3d271deb0cc9c2fc47317d8e431046382939c9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git slub: fix slab_pad_check() When SLAB_POISON is used and slab_pad_check() finds an overwrite of the slab padding, we call restore_bytes() on the whole slab, not only on the padding. Acked-by: Christoph Lameer Reported-by: Zdenek Kabelac Signed-off-by: Eric Dumazet Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index d73f771d278f..b1cb2dfa109a 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -655,7 +655,7 @@ static int slab_pad_check(struct kmem_cache *s, struct page *page) slab_err(s, page, "Padding overwritten. 0x%p-0x%p", fault, end - 1); print_section("Padding", end - remainder, remainder); - restore_bytes(s, "slab padding", POISON_INUSE, start, end); + restore_bytes(s, "slab padding", POISON_INUSE, end - remainder, end); return 0; }