]> git.baikalelectronics.ru Git - kernel.git/commit
mm: fix possible off-by-one in walk_pte_range()
authorJohannes Weiner <hannes@saeurebad.de>
Mon, 28 Apr 2008 09:11:47 +0000 (02:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:16 +0000 (08:58 -0700)
commitcba63f88001f07044d0f3e05bf4b2ea34309391e
treea5bb95b50e88535966af3ad49017196b757fca64
parentb8bff23e565dcc49a5a82366eddc3beae45e2d11
mm: fix possible off-by-one in walk_pte_range()

After the loop in walk_pte_range() pte might point to the first address after
the pmd it walks.  The pte_unmap() is then applied to something bad.

Spotted by Roel Kluin and Andreas Schwab.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Andreas Schwab <schwab@suse.de>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Mikael Pettersson <mikpe@it.uu.se>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/pagewalk.c