diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-09-03 16:08:06 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-09-14 07:57:55 +0300 |
commit | 8a3d271deb0cc9c2fc47317d8e431046382939c9 (patch) | |
tree | 0e6d53380e24bee70afb6102faa3fea8b762f0aa /mm/slub.c | |
parent | 5788d8ad6c113c589eeaaa48a173adbbe6b1cb3d (diff) | |
download | op-kernel-dev-8a3d271deb0cc9c2fc47317d8e431046382939c9.zip op-kernel-dev-8a3d271deb0cc9c2fc47317d8e431046382939c9.tar.gz |
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 <cl@linux-foundation.org>
Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |