]> git.baikalelectronics.ru Git - kernel.git/commit
slab: fix for_each_kmem_cache_node()
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 9 Oct 2014 22:26:20 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Oct 2014 02:25:51 +0000 (22:25 -0400)
commitad1f3d5622d1bf356023ed93102f4f981c89aed8
treee3300b170d693fae1ae2f35dce016f5ecedb6058
parent9ded06667f94c141a2d039031f9153367ce9c361
slab: fix for_each_kmem_cache_node()

Fix a bug (discovered with kmemcheck) in for_each_kmem_cache_node().  The
for loop reads the array "node" before verifying that the index is within
the range.  This results in kmemcheck warning.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab.h