From: Thomas Gleixner <tglx@linutronix.de>
To: Johannes Berg <johannes@sipsolutions.net>,
Mukesh Ojha <quic_mojha@quicinc.com>,
linux-kernel@vger.kernel.org
Cc: sboyd@kernel.org, rafael@kernel.org
Subject: Re: [PATCH] devcoredump : Serialize devcd_del work
Date: Fri, 22 Apr 2022 17:21:18 +0200 [thread overview]
Message-ID: <87ilr15ekx.ffs@tglx> (raw)
In-Reply-To: <e59d076bc05ed319732ac3e234e423affae1cafe.camel@sipsolutions.net>
On Fri, Apr 22 2022 at 15:53, Johannes Berg wrote:
> On Fri, 2022-04-22 at 15:41 +0200, Johannes Berg wrote:
>> On Tue, 2022-04-19 at 15:57 +0530, Mukesh Ojha wrote:
>> > INIT_DELAYED_WORK
>> > schedule_delayed_work
>> >
>>
>> Wouldn't it be easier to simply schedule this before adding it to sysfs
>> and sending the uevent?
Only if it's guaranteed that the timer will not expire before
add_device() succeeds. It's likely, but there is virt....
> Hm. I think that would solve this problem, but not all of the problems
> here ...
>
> Even with your change, I believe it's still racy wrt. disabled_store(),
> since that flushes the work but devcd_data_write() remains reachable
> (and might in fact be waiting for the mutex after your change), so I
> think we need an additional flag somewhere (in addition to the mutex) to
> serialize all of these things against each other.
Plus there is disabled_store() which iterates over the devices and
reschedules the work. How is that supposed to be protected against a
concurrent devcd_del()?
Why needs disabled_store() to do that at all?
Thanks,
tglx
next prev parent reply other threads:[~2022-04-22 15:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 10:27 [PATCH] devcoredump : Serialize devcd_del work Mukesh Ojha
2022-04-22 10:03 ` Mukesh Ojha
2022-04-22 12:13 ` Greg KH
2022-04-22 13:55 ` Greg KH
2022-04-22 13:41 ` Johannes Berg
2022-04-22 13:53 ` Johannes Berg
2022-04-22 15:21 ` Thomas Gleixner [this message]
2022-04-25 13:17 ` Mukesh Ojha
-- strict thread matches above, loose matches on Subject: below --
2022-05-02 15:34 Mukesh Ojha
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=87ilr15ekx.ffs@tglx \
--to=tglx@linutronix.de \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_mojha@quicinc.com \
--cc=rafael@kernel.org \
--cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.