From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+535bbe83dfc3ae8d4be3@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Yunseong Kim <ysk@kzalloc.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] [nfc?] WARNING in nfc_rfkill_set_block
Date: Sun, 31 Aug 2025 16:19:32 +0800 [thread overview]
Message-ID: <20250831081933.6215-1-hdanton@sina.com> (raw)
In-Reply-To: <68b3f389.a00a0220.1337b0.002e.GAE@google.com>
> Date: Sun, 31 Aug 2025 00:02:33 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: c8bc81a52d5a Merge tag 'arm64-fixes' of git://git.kernel.o..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1508ce34580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=bd9738e00c1bbfb4
> dashboard link: https://syzkaller.appspot.com/bug?extid=535bbe83dfc3ae8d4be3
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11019a62580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1308ce34580000
Test Kim's patch.
#syz test
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -1154,6 +1154,7 @@ EXPORT_SYMBOL(nfc_register_device);
void nfc_unregister_device(struct nfc_dev *dev)
{
int rc;
+ struct rfkill *rfk = NULL;
pr_debug("dev_name=%s\n", dev_name(&dev->dev));
@@ -1163,14 +1164,18 @@ void nfc_unregister_device(struct nfc_dev *dev)
"was removed\n", dev_name(&dev->dev));
device_lock(&dev->dev);
+ dev->shutting_down = true;
if (dev->rfkill) {
- rfkill_unregister(dev->rfkill);
- rfkill_destroy(dev->rfkill);
+ rfk = dev->rfkill;
dev->rfkill = NULL;
}
- dev->shutting_down = true;
device_unlock(&dev->dev);
+ if (rfk) {
+ rfkill_unregister(rfk);
+ rfkill_destroy(rfk);
+ }
+
if (dev->ops->check_presence) {
timer_delete_sync(&dev->check_pres_timer);
cancel_work_sync(&dev->check_pres_work);
--
next prev parent reply other threads:[~2025-08-31 8:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 23:05 [syzbot] [nfc?] [net?] " syzbot
2025-08-15 0:11 ` Hillf Danton
2025-08-31 7:02 ` [syzbot] [net?] [nfc?] " syzbot
2025-08-31 8:19 ` Hillf Danton [this message]
2025-08-31 8:44 ` syzbot
2025-08-31 9:59 ` Hillf Danton
2025-08-31 10:19 ` syzbot
2025-08-31 12:56 ` Yunseong Kim
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=20250831081933.6215-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+535bbe83dfc3ae8d4be3@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=ysk@kzalloc.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
all inboxes | Powered by JetHome®