lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 14/X] uprobes: uprobe_deny_signal: check __fatal_signal_pending()
Change uprobe_deny_signal() to check __fatal_signal_pending() along with
xol_was_trapped().

Normally this is not really needed but this is safer. And this makes more
clear the fact that even SIGKILL is handled via UTASK_SSTEP_TRAPPED. Once
again, SIGKILL can be pending because of the core-dumping, we should not
exit with regs->ip pointing to ->xol_vaddr.
---
kernel/uprobes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/uprobes.c b/kernel/uprobes.c
index aa5492a..9e9d4e4 100644
--- a/kernel/uprobes.c
+++ b/kernel/uprobes.c
@@ -1335,7 +1335,7 @@ bool uprobe_deny_signal(void)
clear_tsk_thread_flag(tsk, TIF_SIGPENDING);
spin_unlock_irq(&tsk->sighand->siglock);

- if (xol_was_trapped(tsk)) {
+ if (__fatal_signal_pending(tsk) || xol_was_trapped(tsk)) {
utask->state = UTASK_SSTEP_TRAPPED;
set_tsk_thread_flag(tsk, TIF_UPROBE);
set_tsk_thread_flag(tsk, TIF_NOTIFY_RESUME);
--
1.5.5.1



\
 
 \ /
  Last update: 2011-10-20 00:01    [W:0.193 / U:0.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site