Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263502
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/3] signal: change sig_task_ignored(force) to take sig_kernel_only() into account |
| Date | 2015-11-05 20:30 +0100 |
| Message-ID | <qryoq-2og-19@gated-at.bofh.it> (permalink) |
| References | <qryoq-2og-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
sig_task_ignored(force => true) returns false unless sig_kernel_ignore(). This makes no sense if !sig_kernel_only(), the signal will be dropped in get_signal() anyway. This patch simplifies the next change and allows us to do more cleanups, in particular we can unify the SIGNAL_UNKILLABLE/sig_kernel_only() check in sig_task_ignored() and get_signal(). The user-visible change is that, since we drop the SIG_DFL signal early, it won't be reported to debugger. I think this is fine, but probably we will change this later, we need to fix this logic anyway. Currently we rely on the fact that (say) send_sigtrap() uses force_sig_info() which clears SIGNAL_UNKILLABLE, and this is really bad. Signed-off-by: Oleg Nesterov <oleg@redhat.com> --- kernel/signal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index d64efad..87209e5 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -72,7 +72,7 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force) handler = sig_handler(t, sig); if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) && - handler == SIG_DFL && !force) + handler == SIG_DFL && !(force && sig_kernel_only(sig))) return 1; return sig_handler_ignored(handler, sig); -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-05 20:30 +0100
[PATCH v2 1/3] signal: change sig_task_ignored(force) to take sig_kernel_only() into account Oleg Nesterov <oleg@redhat.com> - 2015-11-05 20:30 +0100
[PATCH v2 2/3] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-05 20:30 +0100
Re: [PATCH 0/3] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Andrew Morton <akpm@linux-foundation.org> - 2015-11-06 00:40 +0100
Re: [PATCH 0/3] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-06 14:40 +0100
Re: [PATCH 0/3] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-06 19:30 +0100
csiph-web