]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Remove broken ptrace() special-case code from file mapping
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 31 Oct 2007 16:19:46 +0000 (09:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Nov 2007 16:12:42 +0000 (08:12 -0800)
commitaead196be316ca4026558ac1139098080e0751c5
treee0c82c6f7dac1fc5b1514e6279d189fb5ebc04be
parentf153577e808532933e2cbe935e68c51be4c9a4b8
Remove broken ptrace() special-case code from file mapping

The kernel has for random historical reasons allowed ptrace() accesses
to access (and insert) pages into the page cache above the size of the
file.

However, Nick broke that by mistake when doing the new fault handling in
commit 54cb8821de07f2ffcd28c380ce9b93d5784b40d7 ("mm: merge populate and
nopage into fault (fixes nonlinear)".  The breakage caused a hang with
gdb when trying to access the invalid page.

The ptrace "feature" really isn't worth resurrecting, since it really is
wrong both from a portability _and_ from an internal page cache validity
standpoint.  So this removes those old broken remnants, and fixes the
ptrace() hang in the process.

Noticed and bisected by Duane Griffin, who also supplied a test-case
(quoth Nick: "Well that's probably the best bug report I've ever had,
thanks Duane!").

Cc: Duane Griffin <duaneg@dghda.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/filemap.c