From: Yunseong Kim <ysk@kzalloc.com>
To: Hillf Danton <hdanton@sina.com>,
syzbot <syzbot+535bbe83dfc3ae8d4be3@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
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 21:56:26 +0900 [thread overview]
Message-ID: <1df5a745-902a-4a57-8abd-6b48cf54fc87@kzalloc.com> (raw)
In-Reply-To: <20250831095915.6269-1-hdanton@sina.com>
Oh, thank you Hillf, for your help!
On 8/31/25 6:59 PM, Hillf Danton wrote:
>> 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);
> --- x/net/bluetooth/hci_core.c
> +++ y/net/bluetooth/hci_core.c
> @@ -1476,8 +1476,14 @@ static void hci_cmd_timeout(struct work_
> if (hdev->reset)
> hdev->reset(hdev);
>
> + rcu_read_lock();
> + if (hci_dev_test_flag(hdev, HCI_CMD_DRAIN_WORKQUEUE)) {
> + rcu_read_unlock();
> + return;
> + }
> atomic_set(&hdev->cmd_cnt, 1);
> queue_work(hdev->workqueue, &hdev->cmd_work);
> + rcu_read_unlock();
> }
>
> /* HCI ncmd timer function */
> --
Last time, as Krzysztof guided, I wanted to try fixing the bugs reported
by syzbot, but since it was my first time following this process, I needed
to look up the steps. Including the bug I’m seeing now, is there anything
else I should do to address these issues?
My plan was to look up the procedure and then revise the patch description
before submitting a v2 patch.
Thank you!
Best regards,
Yunseong Kim (金潤成)
prev parent reply other threads:[~2025-08-31 12:56 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
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 [this message]
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=1df5a745-902a-4a57-8abd-6b48cf54fc87@kzalloc.com \
--to=ysk@kzalloc.com \
--cc=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 \
/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®