Re: [syzbot] [wireless?] INFO: task hung in rfkill_global_led_trigger_worker (3)

From: Tetsuo Handa
Date: Fri Jul 19 2024 - 09:59:53 EST


This is a deadlock which lockdep cannot detect.
Please check which lock should be taken first.

2 locks held by syz.1.2508/23558:
#0: ffff88805ff4f100 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline]
#0: ffff88805ff4f100 (&dev->mutex){....}-{3:3}, at: nfc_unregister_device+0x63/0x2a0 net/nfc/core.c:1165
#1: ffffffff8f8e1b88 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_unregister+0xd0/0x230 net/rfkill/core.c:1149
2 locks held by syz.4.2510/23544:
#0: ffffffff8f8e1b88 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0x1a9/0x790 net/rfkill/core.c:1297
#1: ffff88805ff4f100 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline]
#1: ffff88805ff4f100 (&dev->mutex){....}-{3:3}, at: nfc_dev_down net/nfc/core.c:143 [inline]
#1: ffff88805ff4f100 (&dev->mutex){....}-{3:3}, at: nfc_rfkill_set_block+0x50/0x310 net/nfc/core.c:179

On 2024/07/19 22:15, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: b1bc554e009e Merge tag 'media/v6.11-1' of git://git.kernel..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14478ba5980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=2899dbd4b1c2b65c
> dashboard link: https://syzkaller.appspot.com/bug?extid=50499e163bfa302dfe7b
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/c44f53981874/disk-b1bc554e.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/04c685d98327/vmlinux-b1bc554e.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/3627aa754881/bzImage-b1bc554e.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+50499e163bfa302dfe7b-Pl5Pbv+GP7P466ipTTIvnc23WoclnBCfAL8bYrjMMd8@xxxxxxxxxxxxxxxx
>