]> git.baikalelectronics.ru Git - kernel.git/commit
lib/radix-tree.c: fix overflow in radix_tree_range_tag_if_tagged()
authorJan Kara <jack@suse.cz>
Thu, 19 Aug 2010 21:13:33 +0000 (14:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Aug 2010 16:34:55 +0000 (09:34 -0700)
commit9099e81c10d156a9c12c4dfa4f097a192cb2b287
treef06894404e4af25051e8918bfd3fdac95974fc97
parentde5f3dd760440934d84c2855376887cf7f464b65
lib/radix-tree.c: fix overflow in radix_tree_range_tag_if_tagged()

When radix_tree_maxindex() is ~0UL, it can happen that scanning overflows
index and tree traversal code goes astray reading memory until it hits
unreadable memory.  Check for overflow and exit in that case.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/radix-tree.c
mm/page-writeback.c