From: "Michał Kępień" <kernel@kempniu.pl>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S . Miller" <davem@davemloft.net>,
"Михаил Кринкин" <krinkin.m.u@gmail.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] rfkill: Add rfkill-any LED trigger
Date: Thu, 5 Jan 2017 15:36:54 +0100 [thread overview]
Message-ID: <20170105143654.GA21040@ozzy.nask.waw.pl> (raw)
In-Reply-To: <1483361523.21014.1.camel@sipsolutions.net>
> On Mon, 2017-01-02 at 13:21 +0100, Johannes Berg wrote:
> > > I'm not super happy with this conditional locking - can't we
> > > instead
> > > defer the necessary work to a workqueue, or so, for purposes of the
> > > LED?
> >
> > Actually, since you can sleep in here, and do various other things
> > like scheduling etc. this can't even be correct as is - one thread
> > might be in the probe and another might also attempt to do some
> > operations that require the lock but now don't take it.
>
> Additionally, this doesn't address the "can be called in any context"
> part, only the "even from within rfkill callbacks" part. It's clearly
> still not safe to call this from any context that is not allowed to
> sleep, for example.
Thanks for reviewing. I will attempt a workqueue-based approach in v4.
--
Best regards,
Michał Kępień
next prev parent reply other threads:[~2017-01-05 14:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 8:45 [PATCH v3] rfkill: Add rfkill-any LED trigger Michał Kępień
2017-01-02 11:12 ` Johannes Berg
2017-01-02 12:21 ` Johannes Berg
2017-01-02 12:52 ` Johannes Berg
2017-01-05 14:36 ` Michał Kępień [this message]
2017-01-02 11:47 ` Mike Krinkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170105143654.GA21040@ozzy.nask.waw.pl \
--to=kernel@kempniu.pl \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=krinkin.m.u@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).