lkml.org 
[lkml]   [2012]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [regression] boot failure on alpha, bisected
On 10/07, Al Viro wrote:
>
> On Sun, Oct 07, 2012 at 06:55:34PM +0200, Oleg Nesterov wrote:
>
> > Hmm. I know nothing about arch/alpha and I can't understand its entry.S.
> > But _it seems_ to me that do_notify_resume() is called with irqs disabled.
> > If this is true, then imho arch/alpha should be fixed.
> >
> > Before this commit task_work_run() enabled irqs, but this was the "side
> > effect" of spin_lock_irq/spin_unlock_irq, we should not rely on this.
>
> Um... There's a bunch of architectures that are in the same situation.
> grep for do_notify_resume() and you'll see...

And every do_notify_resume() should be changed anyway, do_signal() and
tracehook_notify_resume() should be re-ordered.

> It needs to be dealt with sanely, and actually have patches for alpha
> going in that direction, but breaking a bunch of architectures is not a good
> thing, obviously. So you've bought yourself a major PITA for coming
> weeks...

So perhaps the patch below until they are fixed?


--- x/kernel/task_work.c
+++ x/kernel/task_work.c
@@ -51,6 +51,9 @@ void task_work_run(void)
struct task_struct *task = current;
struct callback_head *work, *head, *next;

+ if (WARN_ONCE(irqs_disabled(), "notify_resume() with irqs_disabled"))
+ local_irq_enable();
+
for (;;) {
/*
* work->func() can do task_work_add(), do not set


\
 
 \ /
  Last update: 2012-10-07 20:21    [W:0.327 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site