WARNING in plfxlc_mac_release
Subsystems (4)
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: 933069701c1b Merge tag '6.11-rc-smb3-server-fixes' of git:.. git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing console output: https://syzkaller.appspot.com/x/log.txt?x=14faa9e6980000 kernel config: https://syzkaller.appspot.com/x/.config?x=f828342678294017 dashboard link: https://syzkaller.appspot.com/bug?extid=51a42f7c2e399392ea82 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17d80965980000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16ccfd3d980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/22dd51445d03/disk-93306970.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f85f111961d5/vmlinux-93306970.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7971b4814e87/bzImage-93306970.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
usb 1-1: New USB device found, idVendor=2ef5, idProduct=000a, bcdDevice=21.c2 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 plfxlc 1-1:1.167: Firmware Version: 0
plfxlc 1-1:1.167: Unit type is station
plfxlc 1-1:1.167: vendor command failed (-71)
plfxlc 1-1:1.167: FPGA download failed (-22)
------------[ cut here ]------------ WARNING: CPU: 0 PID: 41 at drivers/net/wireless/purelifi/plfxlc/mac.c:105 plfxlc_mac_release+0x89/0xb0 drivers/net/wireless/purelifi/plfxlc/mac.c:105 Modules linked in: CPU: 0 UID: 0 PID: 41 Comm: kworker/0:2 Not tainted 6.10.0-syzkaller-g933069701c1b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: usb_hub_wq hub_event RIP: 0010:plfxlc_mac_release+0x89/0xb0 drivers/net/wireless/purelifi/plfxlc/mac.c:105 Code: 3d f8 66 fd 48 8d bb 08 33 00 00 be ff ff ff ff e8 5c 61 f5 02 31 ff 89 c3 89 c6 e8 21 f3 66 fd 85 db 75 d4 e8 18 f8 66 fd 90 <0f> 0b 90 5b 5d e9 0d f8 66 fd 48 c7 c7 d8 9e 32 8a e8 21 f1 bb fd RSP: 0018:ffffc900004c6f50 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff83ec60bf RDX: ffff888105ab3a00 RSI: ffffffff83ec60c8 RDI: 0000000000000005 RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff92000098df1 R13: ffff88810f6eb000 R14: ffff8881137eb080 R15: ffff88810f6eb078 FS: 0000000000000000(0000) GS:ffff8881f6200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055993fa01a80 CR3: 000000010d7ae000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> probe+0x84a/0xba0 drivers/net/wireless/purelifi/plfxlc/usb.c:694 usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:578 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:656 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:798 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:956 bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x114b/0x1a70 drivers/base/core.c:3679 usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254 usb_probe_device+0xec/0x3e0 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:578 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:656 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:798 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:956 bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x114b/0x1a70 drivers/base/core.c:3679 usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2651 hub_port_connect drivers/usb/core/hub.c:5521 [inline] hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] port_event drivers/usb/core/hub.c:5821 [inline] hub_event+0x2e66/0x4f50 drivers/usb/core/hub.c:5903 process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf20 kernel/workqueue.c:3390 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 </TASK>
---
This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
not need assert for mac->lock in plfxlc_mac_release
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git 933069701c1b
drivers/net/wireless/purelifi/plfxlc/mac.c +0 -1
@@ -102,7 +102,6 @@ int plfxlc_mac_init_hw(struct ieee80211_hw *hw)void plfxlc_mac_release (struct plfxlc_mac *mac) {plfxlc_chip_release (&mac->chip); -lockdep_assert_held (&mac->lock); }int plfxlc_op_start (struct ieee80211_hw *hw)
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Tested on:
commit: 93306970 Merge tag '6.11-rc-smb3-server-fixes' of git:.. git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git console output: https://syzkaller.appspot.com/x/log.txt?x=13d5a94b980000 kernel config: https://syzkaller.appspot.com/x/.config?x=f828342678294017 dashboard link: https://syzkaller.appspot.com/bug?extid=51a42f7c2e399392ea82 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=163cd19d980000
Note: testing is done by a robot and is best-effort only.
PATCH 1/1 wifi: plfxlc: remove assert for mac->lock
In reply to syzbotsyzbot report WARNING in plfxlc_mac_release, according to the context, there is not need assert for mac->lock.
--- drivers/net/wireless/purelifi/plfxlc/mac.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/purelifi/plfxlc/mac.c +0 -1
@@ -102,7 +102,6 @@ int plfxlc_mac_init_hw(struct ieee80211_hw *hw)void plfxlc_mac_release (struct plfxlc_mac *mac) {plfxlc_chip_release (&mac->chip); -lockdep_assert_held (&mac->lock); }int plfxlc_op_start (struct ieee80211_hw *hw)
Signature · 1 line
2.43.0
Re: [PATCH] wifi: plfxlc: remove assert for mac->lock
Quoted 2 lines · Edward Adam Davis
syzbot report WARNING in
plfxlc_mac_release, according to the context, there is not need assert formac->lock.
The commit message should explain _why_ the assert is not needed. Otherwise it looks that you are randomly removing it to get rid of the warning.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [PATCH] wifi: plfxlc: remove assert for mac->lock
Quoted 6 lines · Kalle Valo
Quoted 2 lines
syzbot report WARNING in
plfxlc_mac_release, according to the context, there is not need assert formac->lock.The commit message should explain _why_ the assert is not needed. Otherwise it looks that you are randomly removing it to get rid of the warning.
mac->lock is used to protect mac data, but after calling plfxlc_mac_release(), there are two functions:ieee80211_unregister_hw() and ieee80211_free_hw(), there is no action to operate on mac data in these two functions, so mac->lock is not required.
On the other hand, there is no holding action for mac->lock before calling plfxlc_mac_release.
--
Edward
syzbot
syzbotsyzbot has bisected this issue to:
syzbot has bisected this issue to:
commit 68d57a07bfe5bb29b80cd8b8fa24c9d1ea104124
Author: Srinivasan Raju <[email protected]> Date: Thu Feb 24 18:20:07 2022 +0000
wireless: add plfxlc driver for pureLiFi X, XL, XC devices
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15001f5f980000 start commit: cfba9f07a1d6 Add linux-next specific files for 20241122 git tree: linux-next final oops: https://syzkaller.appspot.com/x/report.txt?x=17001f5f980000 console output: https://syzkaller.appspot.com/x/log.txt?x=13001f5f980000 kernel config: https://syzkaller.appspot.com/x/.config?x=45719eec4c74e6ba dashboard link: https://syzkaller.appspot.com/bug?extid=51a42f7c2e399392ea82 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=101a59c0580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12bcc778580000
For information about bisection process see: https://goo.gl/tpsmEJ#bisection