Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139680
b: refs/heads/master
c: 43918f2
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Apr 3, 2009
1 parent f03449f commit 3f29af6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90bc8d8b1a38f1ab131a2399a202e1889db95de8
refs/heads/master: 43918f2bf4806675943416d539d9d5e4d585ebff
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,6 @@ asmregparm void syscall_trace_leave(struct pt_regs *regs)
* system call instruction.
*/
if (test_thread_flag(TIF_SINGLESTEP) &&
tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL))
tracehook_consider_fatal_signal(current, SIGTRAP))
send_sigtrap(current, regs, 0, TRAP_BRKPT);
}
13 changes: 4 additions & 9 deletions trunk/include/linux/tracehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,14 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
* tracehook_consider_ignored_signal - suppress short-circuit of ignored signal
* @task: task receiving the signal
* @sig: signal number being sent
* @handler: %SIG_IGN or %SIG_DFL
*
* Return zero iff tracing doesn't care to examine this ignored signal,
* so it can short-circuit normal delivery and never even get queued.
* Either @handler is %SIG_DFL and @sig's default is ignore, or it's %SIG_IGN.
*
* Called with @task->sighand->siglock held.
*/
static inline int tracehook_consider_ignored_signal(struct task_struct *task,
int sig,
void __user *handler)
int sig)
{
return (task_ptrace(task) & PT_PTRACED) != 0;
}
Expand All @@ -407,19 +404,17 @@ static inline int tracehook_consider_ignored_signal(struct task_struct *task,
* tracehook_consider_fatal_signal - suppress special handling of fatal signal
* @task: task receiving the signal
* @sig: signal number being sent
* @handler: %SIG_DFL or %SIG_IGN
*
* Return nonzero to prevent special handling of this termination signal.
* Normally @handler is %SIG_DFL. It can be %SIG_IGN if @sig is ignored,
* in which case force_sig() is about to reset it to %SIG_DFL.
* Normally handler for signal is %SIG_DFL. It can be %SIG_IGN if @sig is
* ignored, in which case force_sig() is about to reset it to %SIG_DFL.
* When this returns zero, this signal might cause a quick termination
* that does not give the debugger a chance to intercept the signal.
*
* Called with or without @task->sighand->siglock held.
*/
static inline int tracehook_consider_fatal_signal(struct task_struct *task,
int sig,
void __user *handler)
int sig)
{
return (task_ptrace(task) & PT_PTRACED) != 0;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static int sig_ignored(struct task_struct *t, int sig)
/*
* Tracers may want to know about even ignored signals.
*/
return !tracehook_consider_ignored_signal(t, sig, handler);
return !tracehook_consider_ignored_signal(t, sig);
}

/*
Expand Down Expand Up @@ -318,7 +318,7 @@ int unhandled_signal(struct task_struct *tsk, int sig)
return 1;
if (handler != SIG_IGN && handler != SIG_DFL)
return 0;
return !tracehook_consider_fatal_signal(tsk, sig, handler);
return !tracehook_consider_fatal_signal(tsk, sig);
}


Expand Down Expand Up @@ -777,7 +777,7 @@ static void complete_signal(int sig, struct task_struct *p, int group)
!(signal->flags & (SIGNAL_UNKILLABLE | SIGNAL_GROUP_EXIT)) &&
!sigismember(&t->real_blocked, sig) &&
(sig == SIGKILL ||
!tracehook_consider_fatal_signal(t, sig, SIG_DFL))) {
!tracehook_consider_fatal_signal(t, sig))) {
/*
* This signal will be fatal to the whole group.
*/
Expand Down

0 comments on commit 3f29af6

Please sign in to comment.