lkml.org 
[lkml]   [2019]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Revert "leds: avoid races with workqueue"?
On Sat 2019-05-25 10:32:31, Hugh Dickins wrote:
> On Sat, 25 May 2019, Pavel Machek wrote:
>
> > Hi!
> >
> > > I'm having to revert 0db37915d912 ("leds: avoid races with workqueue")
> > > from my 5.2-rc testing tree, because lockdep and other debug options
> > > don't like it: net/mac80211/led.c arranges for led_blink_setup() to be
> > > called at softirq time, and flush_work() is not good for calling
> > > then.
> >
> > This should keep X60 working (as well as it is now; X60 will still
> > have problems with lost events in setup like yours).
> >
> > Can you test this instead of the revert?
>
> Thanks, Pavel: yes, that works fine for me on the T420s, no debug
> complaints, good and silent; and the wifi LED is blinking as before.

I'd like to prevent recurrence of similar problem, and I wonder if you
can give me a hint.

I can annotate code that can sleep with might_sleep().

How can I annotate code that can not sleep? I might do

spin_lock(&dummy);
this_should_not_sleep();
spin_unlock(&dummy);

But I don't really need extra serialization. I just want annotations for
lockdep. Any ideas?

Pavel

\
 
 \ /
  Last update: 2019-05-26 19:21    [W:0.073 / U:10.508 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site