]> git.baikalelectronics.ru Git - kernel.git/commit
vm: make stack guard page errors return VM_FAULT_SIGSEGV rather than SIGBUS
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Jan 2015 19:15:17 +0000 (11:15 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 29 Jan 2015 19:15:17 +0000 (11:15 -0800)
commitabc4242dac20e6315a45b4d1cfe3946430a92b20
treeff181616c8f82e8ff3a800bb3cd2a586b8fef4e8
parentcc37d0c3d0e582749740fb7a746ad62b2bb9c98e
vm: make stack guard page errors return VM_FAULT_SIGSEGV rather than SIGBUS

The stack guard page error case has long incorrectly caused a SIGBUS
rather than a SIGSEGV, but nobody actually noticed until commit
66f9a71aa8c8 ("mm: propagate error from stack expansion even for guard
page") because that error case was never actually triggered in any
normal situations.

Now that we actually report the error, people noticed the wrong signal
that resulted.  So far, only the test suite of libsigsegv seems to have
actually cared, but there are real applications that use libsigsegv, so
let's not wait for any of those to break.

Reported-and-tested-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Jan Engelhardt <jengelh@inai.de>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
Cc: linux-arch@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c