]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix error case in mlock downgrade reversion
authorHugh Dickins <hugh@veritas.com>
Sun, 8 Feb 2009 20:56:58 +0000 (20:56 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Feb 2009 17:50:36 +0000 (09:50 -0800)
commit7bf97ba5bb635e84e2092d4de4092dcf76ad82a0
treed662cd451f2d364c98c31c80f11c6536a0a36d90
parent82bb8f277d0a486ab49559401227dd2755d7df0f
mm: fix error case in mlock downgrade reversion

commit d5b562330ec766292a3ac54ae5e0673610bd5b3d upstream.

Commit 27421e211a39784694b597dbf35848b88363c248, Manually revert
"mlock: downgrade mmap sem while populating mlocked regions", has
introduced its own regression: __mlock_vma_pages_range() may report
an error (for example, -EFAULT from trying to lock down pages from
beyond EOF), but mlock_vma_pages_range() must hide that from its
callers as before.

Reported-by: Sami Farin <safari-kernel@safari.iki.fi>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mlock.c