diff options
author | John David Anglin <dave.anglin@bell.net> | 2016-10-28 23:00:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-10 16:36:34 +0100 |
commit | f2d9107bd0a0f86c4b3fb539a2d980ada926c276 (patch) | |
tree | bdea9fbdb8216d674185e4508150387478e9a0bc /arch/parisc/kernel/signal32.c | |
parent | e3d312c435dd98a8b7a8dbaca9568f20449d5e47 (diff) |
parisc: Ensure consistent state when switching to kernel stack at syscall entry
commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 upstream.
We have one critical section in the syscall entry path in which we switch from
the userspace stack to kernel stack. In the event of an external interrupt, the
interrupt code distinguishes between those two states by analyzing the value of
sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that
the value of sr7 is in sync with the currently enabled stack.
This patch now disables interrupts while executing the critical section. This
prevents the interrupt handler to possibly see an inconsistent state which in
the worst case can lead to crashes.
Interestingly, in the syscall exit path interrupts were already disabled in the
critical section which switches back to the userspace stack.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc/kernel/signal32.c')
0 files changed, 0 insertions, 0 deletions