Message ID | 1450287568-19808-129-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
This one was completely buggy. Make sure you get the fix to the fix too. Linus
On 12/16, Kamal Mostafa wrote: > > 3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. > > > commit 68985633bccb6066bf1803e316fbc6c1f5b796d6 upstream. Please note that this patch is wrong without the next fix from Peter. And in fact to me it is still not clear whether we really want to do this, this probably needs more investigation. Oleg.
On Wed, 2015-12-16 at 18:57 +0100, Oleg Nesterov wrote: > On 12/16, Kamal Mostafa wrote: > > > > 3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. > > > > > > commit 68985633bccb6066bf1803e316fbc6c1f5b796d6 upstream. > > Please note that this patch is wrong without the next fix from Peter. > > And in fact to me it is still not clear whether we really want to do > this, this probably needs more investigation. > > Oleg. > Thanks for the heads-up, Linus and Oleg. I'll just hold both of them out of 3.19-stable until the dust settles. Deferred until next 3.19 cycle: 6898563 sched/wait: Fix signal handling in bit wait helpers dfd01f0 sched/wait: Fix the signal handling fix -Kamal
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 852143a..e0bb7e6 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c @@ -583,18 +583,18 @@ EXPORT_SYMBOL(wake_up_atomic_t); __sched int bit_wait(struct wait_bit_key *word) { - if (signal_pending_state(current->state, current)) - return 1; schedule(); + if (signal_pending(current)) + return -EINTR; return 0; } EXPORT_SYMBOL(bit_wait); __sched int bit_wait_io(struct wait_bit_key *word) { - if (signal_pending_state(current->state, current)) - return 1; io_schedule(); + if (signal_pending(current)) + return -EINTR; return 0; } EXPORT_SYMBOL(bit_wait_io); @@ -602,11 +602,11 @@ EXPORT_SYMBOL(bit_wait_io); __sched int bit_wait_timeout(struct wait_bit_key *word) { unsigned long now = ACCESS_ONCE(jiffies); - if (signal_pending_state(current->state, current)) - return 1; if (time_after_eq(now, word->timeout)) return -EAGAIN; schedule_timeout(word->timeout - now); + if (signal_pending(current)) + return -EINTR; return 0; } EXPORT_SYMBOL_GPL(bit_wait_timeout); @@ -614,11 +614,11 @@ EXPORT_SYMBOL_GPL(bit_wait_timeout); __sched int bit_wait_io_timeout(struct wait_bit_key *word) { unsigned long now = ACCESS_ONCE(jiffies); - if (signal_pending_state(current->state, current)) - return 1; if (time_after_eq(now, word->timeout)) return -EAGAIN; io_schedule_timeout(word->timeout - now); + if (signal_pending(current)) + return -EINTR; return 0; } EXPORT_SYMBOL_GPL(bit_wait_io_timeout);