Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263324
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() |
| Date | 2015-11-05 16:20 +0100 |
| Message-ID | <qruuv-8oo-33@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qqpwS-745-21@gated-at.bofh.it> <qqqVZ-83U-23@gated-at.bofh.it> <qraYN-411-9@gated-at.bofh.it> <qraYN-411-7@gated-at.bofh.it> <qrhxg-8gH-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 11/04, Andrew Morton wrote:
>
> On Wed, 4 Nov 2015 20:19:12 +0100 Oleg Nesterov <oleg@redhat.com> wrote:
>
> > This explains WARN_ON(!JOBCTL_STOP_PENDING) in task_participate_group_stop()
> > triggered by the test-case from Dmitry:
> >
> > int main()
> > {
> > int pid = 1;
> > ptrace(PTRACE_ATTACH, pid, 0, 0);
> > ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_EXITKILL);
> > sleep(1);
> > return 0;
> > }
...
> > The test-case above needs root and (correctly) crashes the kernel,
> I'm thinking this should be backported into -stable due to WARN_ONs and
> kernel crashes.
Ah, sorry for confusion. The kernel crash is fine/correct. Debugger kills
init process, the exiting init calls panic(). With or without this patch.
BTW, I always thought we should remove this panic(), but this is off-topic.
After this patch the test-case above still crashes the kernel, but without
warning ;)
> And as f008faff0e27 is from 2009, that means all
> kernels.
Yes, I think this change is safe for -stable. But the only visible problem
is WARN_ON_ONCE() in task_participate_group_stop(), so I am not sure...
Well. Actually there are more problems. zap_threads(), de_thread() can be
fooled by signal_group_exit() == F too. So a multi-threaded /sbin/init can
miss SIGKILL if it does execve(), or if it starts the coredump. But only if
SIGKILL was private (sent by tkill).
I do not see any serious problem this patch could fix.
Oleg.
--
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
WARNING in task_participate_group_stop Dmitry Vyukov <dvyukov@google.com> - 2015-11-02 14:30 +0100
Re: WARNING in task_participate_group_stop Oleg Nesterov <oleg@redhat.com> - 2015-11-02 15:20 +0100
Re: WARNING in task_participate_group_stop Dmitry Vyukov <dvyukov@google.com> - 2015-11-02 15:30 +0100
Re: WARNING in task_participate_group_stop Oleg Nesterov <oleg@redhat.com> - 2015-11-02 15:40 +0100
Re: WARNING in task_participate_group_stop Oleg Nesterov <oleg@redhat.com> - 2015-11-02 16:50 +0100
Re: WARNING in task_participate_group_stop Oleg Nesterov <oleg@redhat.com> - 2015-11-02 18:20 +0100
[PATCH 1/1] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-04 19:30 +0100
Re: [PATCH 1/1] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Andrew Morton <akpm@linux-foundation.org> - 2015-11-05 02:30 +0100
Re: [PATCH 1/1] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-05 16:20 +0100
Re: [PATCH 1/1] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Oleg Nesterov <oleg@redhat.com> - 2015-11-05 18:10 +0100
[PATCH 0/1] (Was: WARNING in task_participate_group_stop) Oleg Nesterov <oleg@redhat.com> - 2015-11-04 19:30 +0100
csiph-web