summaryrefslogtreecommitdiff
path: root/lib/lz4
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-04-10 00:18:38 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:18:38 (GMT)
commit546472740ca0a79528dacaba0a2307e5cc70000e (patch)
tree2ccd8f5805b6e883eee5dab891656995f3a0ab02 /lib/lz4
parent4fc142158128b576d5d598de0ee31b61c1a93ae0 (diff)
downloadlinux-fsl-qoriq-546472740ca0a79528dacaba0a2307e5cc70000e.tar.xz
signal/x86: Delay calling signals in atomic
On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using a per CPU debug stack defined by the IST. If we schedule out, another task can come in and use the same stack and cause the stack to be corrupted and crash the kernel on return. When CONFIG_PREEMPT_RT_FULL is enabled, spin_locks become mutexes, and one of these is the spin lock used in signal handling. Some of the debug code (int3) causes do_trap() to send a signal. This function calls a spin lock that has been converted to a mutex and has the possibility to sleep. If this happens, the above issues with the corrupted stack is possible. Instead of calling the signal right away, for PREEMPT_RT and x86_64, the signal information is stored on the stacks task_struct and TIF_NOTIFY_RESUME is set. Then on exit of the trap, the signal resume code will send the signal when preemption is enabled. [ rostedt: Switched from #ifdef CONFIG_PREEMPT_RT_FULL to ARCH_RT_DELAYS_SIGNAL_SEND and added comments to the code. ] Cc: stable-rt@vger.kernel.org Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/lz4')
0 files changed, 0 insertions, 0 deletions