============================= [ BUG: Invalid wait context ] 6.12.0-rc6-syzkaller-00318-ga9cda7c0ffed #0 Not tainted ----------------------------- klogd/5197 is trying to lock: ffff8880b873ea98 (subsys mutex#58){+.+.}-{3:3}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 other info that might help us debug this: context-{4:4} 3 locks held by klogd/5197: #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: sock_def_readable+0xd7/0x5b0 net/core/sock.c:3439 #1: ffff888148c9e058 (&ei->socket.wq.wait){..-.}-{2:2}, at: __wake_up_common_lock+0x25/0x1e0 kernel/sched/wait.c:105 #2: ffff88807c008a18 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] #2: ffff88807c008a18 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xbe/0x14b0 kernel/sched/core.c:4165 stack backtrace: CPU: 0 UID: 0 PID: 5197 Comm: klogd Not tainted 6.12.0-rc6-syzkaller-00318-ga9cda7c0ffed #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4802 [inline] check_wait_context kernel/locking/lockdep.c:4874 [inline] __lock_acquire+0x154a/0x2050 kernel/locking/lockdep.c:5152 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 raw_spin_rq_lock kernel/sched/sched.h:1505 [inline] rq_lock kernel/sched/sched.h:1804 [inline] ttwu_queue kernel/sched/core.c:3951 [inline] try_to_wake_up+0x81e/0x14b0 kernel/sched/core.c:4281 autoremove_wake_function+0x16/0x110 kernel/sched/wait.c:384 __wake_up_common kernel/sched/wait.c:89 [inline] __wake_up_common_lock+0x132/0x1e0 kernel/sched/wait.c:106 sock_def_readable+0x20f/0x5b0 net/core/sock.c:3442 unix_dgram_sendmsg+0x1495/0x1f80 net/unix/af_unix.c:2167 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x223/0x270 net/socket.c:744 __sys_sendto+0x39b/0x4f0 net/socket.c:2214 __do_sys_sendto net/socket.c:2226 [inline] __se_sys_sendto net/socket.c:2222 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2222 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f84acc0c9b5 Code: 8b 44 24 08 48 83 c4 28 48 98 c3 48 98 c3 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 26 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 7a 48 8b 15 44 c4 0c 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffcca412698 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f84acc0c9b5 RDX: 000000000000007d RSI: 00005593e4a2f190 RDI: 0000000000000003 RBP: 00005593e4a28910 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000013 R13: 00007f84acd9a212 R14: 00007ffcca412798 R15: 0000000000000000 ================================================================== BUG: KASAN: wild-memory-access in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: wild-memory-access in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: wild-memory-access in __lock_acquire+0xc8b/0x2050 kernel/locking/lockdep.c:5172 Read of size 8 at addr 1fffffff87715c68 by task klogd/5197 CPU: 0 UID: 0 PID: 5197 Comm: klogd Not tainted 6.12.0-rc6-syzkaller-00318-ga9cda7c0ffed #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_report+0xe8/0x550 mm/kasan/report.c:491 kasan_report+0x143/0x180 mm/kasan/report.c:601 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] __lock_acquire+0xc8b/0x2050 kernel/locking/lockdep.c:5172 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 raw_spin_rq_lock kernel/sched/sched.h:1505 [inline] rq_lock kernel/sched/sched.h:1804 [inline] ttwu_queue kernel/sched/core.c:3951 [inline] try_to_wake_up+0x81e/0x14b0 kernel/sched/core.c:4281 autoremove_wake_function+0x16/0x110 kernel/sched/wait.c:384 __wake_up_common kernel/sched/wait.c:89 [inline] __wake_up_common_lock+0x132/0x1e0 kernel/sched/wait.c:106 sock_def_readable+0x20f/0x5b0 net/core/sock.c:3442 unix_dgram_sendmsg+0x1495/0x1f80 net/unix/af_unix.c:2167 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x223/0x270 net/socket.c:744 __sys_sendto+0x39b/0x4f0 net/socket.c:2214 __do_sys_sendto net/socket.c:2226 [inline] __se_sys_sendto net/socket.c:2222 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2222 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f84acc0c9b5 Code: 8b 44 24 08 48 83 c4 28 48 98 c3 48 98 c3 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 26 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 7a 48 8b 15 44 c4 0c 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffcca412698 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f84acc0c9b5 RDX: 000000000000007d RSI: 00005593e4a2f190 RDI: 0000000000000003 RBP: 00005593e4a28910 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000013 R13: 00007f84acd9a212 R14: 00007ffcca412798 R15: 0000000000000000 ==================================================================