Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in try_to_wake_up
general protection fault, probably for non-canonical address 0xdffffc0000000119: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000008c8-0x00000000000008cf]
CPU: 1 PID: 10157 Comm: syz-executor.3 Not tainted 5.12.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__lock_acquire+0xcfe/0x54c0 kernel/locking/lockdep.c:4770
Code: 6c 0d 41 bf 01 00 00 00 0f 86 8c 00 00 00 89 05 a8 ad 6c 0d e9 81 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 5b 31 00 00 49 81 3e 80 c3 9a 8e 0f 84 d0 f3 ff
RSP: 0018:ffffc90009faf818 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000119 RSI: 1ffff920013f5f14 RDI: 00000000000008c8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88801bef8300
R13: 0000000000000000 R14: 00000000000008c8 R15: 0000000000000000
FS: 00007f68abb66700(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004af938 CR3: 0000000033823000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
lock_acquire kernel/locking/lockdep.c:5510 [inline]
lock_acquire+0x1ab/0x730 kernel/locking/lockdep.c:5475
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159
try_to_wake_up+0x98/0x14a0 kernel/sched/core.c:3347
attach_store.cold+0x372/0x395 drivers/usb/usbip/vhci_sysfs.c:431
dev_attr_store+0x50/0x80 drivers/base/core.c:1989
sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:139
kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296
call_write_iter include/linux/fs.h:1977 [inline]
new_sync_write+0x426/0x650 fs/read_write.c:518
vfs_write+0x796/0xa30 fs/read_write.c:605
ksys_write+0x12d/0x250 fs/read_write.c:658
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x418f7f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 99 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 cc fd ff ff 48
RSP: 002b:00007f68abb65b90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 0000000000418f7f
RDX: 0000000000000008 RSI: 00007f68abb65be0 RDI: 0000000000000005
RBP: 0000000000000005 R08: 0000000000000000 R09: 00007f68abb65b30
R10: 0000000000000000 R11: 0000000000000293 R12: 00000000004af938
R13: 00007f68abb65be0 R14: 0000000000000000 R15: 0000000000022000
Modules linked in:
---[ end trace a45535e6c08153f8 ]---
RIP: 0010:__lock_acquire+0xcfe/0x54c0 kernel/locking/lockdep.c:4770
Code: 6c 0d 41 bf 01 00 00 00 0f 86 8c 00 00 00 89 05 a8 ad 6c 0d e9 81 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 5b 31 00 00 49 81 3e 80 c3 9a 8e 0f 84 d0 f3 ff
RSP: 0018:ffffc90009faf818 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000119 RSI: 1ffff920013f5f14 RDI: 00000000000008c8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88801bef8300
R13: 0000000000000000 R14: 00000000000008c8 R15: 0000000000000000
FS: 00007f68abb66700(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004af938 CR3: 0000000033823000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Tested on:
commit: e7a65d46 usbip: fix vhci races in connection tear down
git tree: git://
git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git usbip_test
console output:
https://syzkaller.appspot.com/x/log.txt?x=13b69b2ad00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b954d54a11c4fceb
dashboard link:
https://syzkaller.appspot.com/bug?extid=a93fba6d384346a761e3
compiler: