diff options
author | Helge Deller <deller@gmx.de> | 2017-07-02 22:00:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-21 07:42:20 +0200 |
commit | 008a1f2707488cf900bb20e29a8676cabeb6d405 (patch) | |
tree | dd2c5a518e2f22837f4645494e14c0c8570409ed /arch | |
parent | 59613f80ec670685b83932350980194ea082c96a (diff) | |
download | linux-stable-008a1f2707488cf900bb20e29a8676cabeb6d405.tar.gz linux-stable-008a1f2707488cf900bb20e29a8676cabeb6d405.tar.bz2 linux-stable-008a1f2707488cf900bb20e29a8676cabeb6d405.zip |
parisc: Report SIGSEGV instead of SIGBUS when running out of stack
commit 247462316f85a9e0479445c1a4223950b68ffac1 upstream.
When a process runs out of stack the parisc kernel wrongly faults with SIGBUS
instead of the expected SIGSEGV signal.
This example shows how the kernel faults:
do_page_fault() command='a.out' type=15 address=0xfaac2000 in libc-2.24.so[f8308000+16c000]
trap #15: Data TLB miss fault, vm_start = 0xfa2c2000, vm_end = 0xfaac2000
The vma->vm_end value is the first address which does not belong to the vma, so
adjust the check to include vma->vm_end to the range for which to send the
SIGSEGV signal.
This patch unbreaks building the debian libsigsegv package.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/mm/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 040c48fc5391..b6f3b5e98810 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -366,7 +366,7 @@ bad_area: case 15: /* Data TLB miss fault/Data page fault */ /* send SIGSEGV when outside of vma */ if (!vma || - address < vma->vm_start || address > vma->vm_end) { + address < vma->vm_start || address >= vma->vm_end) { si.si_signo = SIGSEGV; si.si_code = SEGV_MAPERR; break; |