From: Jakub Kicinski <kuba@kernel.org>
To: Chen Yufeng <chenyufeng@iie.ac.cn>
Cc: krzk@kernel.org, davem@davemloft.net, edumazet@google.com,
horms@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH]nfc: replace improper check device_is_registered() in nfc_se_io()
Date: Tue, 15 Apr 2025 17:38:26 -0700 [thread overview]
Message-ID: <20250415173826.6b264206@kernel.org> (raw)
In-Reply-To: <20250415025436.203-1-chenyufeng@iie.ac.cn>
On Tue, 15 Apr 2025 10:54:36 +0800 Chen Yufeng wrote:
> > On 14/04/2025 16:11, Chen Yufeng wrote:
> > > A patch similar to commit da5c0f119203 ("nfc: replace improper check device_is_registered() in netlink related functions")
>
> > Please wrap commit message according to Linux coding style / submission
> > process (neither too early nor over the limit):
> > https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
>
> Thanks for your reply!
> I have reorganized commit message as follows.
>
> A patch similar to commit da5c0f119203 ("nfc: replace improper check
> device_is_registered() in netlink related functions").
>
> The nfc_se_io() function in the NFC subsystem suffers from a race
> condition similar to previously reported issues in other netlink-related
> functions. The function checks device status using device_is_registered(),
> but this check can race with device unregistration despite being protected
> by device_lock.
>
> This patch also uses bool variable dev->shutting_down instead of
> device_is_registered() to judge whether the nfc device is registered,
> which is well synchronized.
You're also missing a Fixes tag
--
pw-bot: cr
next prev parent reply other threads:[~2025-04-16 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 14:11 [PATCH]nfc: replace improper check device_is_registered() in nfc_se_io() Chen Yufeng
2025-04-14 14:55 ` Krzysztof Kozlowski
2025-04-15 2:54 ` Chen Yufeng
2025-04-16 0:38 ` Jakub Kicinski [this message]
2025-04-16 2:33 ` Chen Yufeng
2025-04-16 2:44 ` Chen Yufeng
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=20250415173826.6b264206@kernel.org \
--to=kuba@kernel.org \
--cc=chenyufeng@iie.ac.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=krzk@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).