Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1319845
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] signals: work around random wakeups in sigsuspend() |
| Date | 2016-01-27 22:10 +0100 |
| Message-ID | <qVFvL-1dk-73@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qUX1F-1E8-13@gated-at.bofh.it> <qVjbR-1GJ-29@gated-at.bofh.it> <qVtXz-Pn-11@gated-at.bofh.it> <qVBs7-6oZ-43@gated-at.bofh.it> <qVDaA-7NJ-75@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/27, Andrew Morton wrote: > > On Wed, 27 Jan 2016 17:41:54 +0100 Oleg Nesterov <oleg@redhat.com> wrote: > > > IOW, signal_pending() is the "special" condition, you do not need to serialize > > this check with task->state setting, exactly because schedule() knows about the > > signals. > > So it's non-buggy because signal_pending() is special. But it *looks* > buggy! And there's no comment there explaining why it looks buggy but > isn't, so someone may later come along and "fix" it for us. perhaps we can add a comment somewhere in sched.h to explain that a task can never sleep with task->state == STATE if signal_pending_state(STATE) is true. Every user of signal_pending() in the wait-event-like loop relies on this well- known fact. Say, wait_event_interruptible() or __mutex_lock_common(). This is actually more about task->state, not about TIF_SIGPENDING imo. Oleg.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] signals: work around random wakeups in sigsuspend() Sasha Levin <sasha.levin@oracle.com> - 2016-01-25 17:00 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Oleg Nesterov <oleg@redhat.com> - 2016-01-25 20:10 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Peter Zijlstra <peterz@infradead.org> - 2016-01-25 20:40 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Andrew Morton <akpm@linux-foundation.org> - 2016-01-25 22:40 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Oleg Nesterov <oleg@redhat.com> - 2016-01-26 22:20 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Peter Zijlstra <peterz@infradead.org> - 2016-01-27 09:50 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Oleg Nesterov <oleg@redhat.com> - 2016-01-27 17:50 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Peter Zijlstra <peterz@infradead.org> - 2016-01-27 19:00 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Andrew Morton <akpm@linux-foundation.org> - 2016-01-27 19:40 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Oleg Nesterov <oleg@redhat.com> - 2016-01-27 22:10 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Sasha Levin <sasha.levin@oracle.com> - 2016-01-27 18:30 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Ingo Molnar <mingo@kernel.org> - 2016-01-26 07:50 +0100
Re: [PATCH] signals: work around random wakeups in sigsuspend() Oleg Nesterov <oleg@redhat.com> - 2016-01-26 16:10 +0100
csiph-web