[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250831081933.6215-1-hdanton@sina.com>
Date: Sun, 31 Aug 2025 16:19:32 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+535bbe83dfc3ae8d4be3@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
Yunseong Kim <ysk@...lloc.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] [nfc?] WARNING in nfc_rfkill_set_block
> 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);
--
Powered by blists - more mailing lists