============================= WARNING: suspicious RCU usage 6.0.0-rc1-next-20220818-syzkaller #0 Not tainted ----------------------------- include/net/sock.h:592 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 4 locks held by syz-executor.3/6899: #0: ffff88802f175610 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff88802f175610 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash net/ipv4/udp.c:2014 [inline] #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash+0x1d5/0x730 net/ipv4/udp.c:2004 #2: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #2: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x22/0x4a0 net/core/sock_reuseport.c:346 #3: ffff888033842bb8 (clock-AF_INET6){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 stack backtrace: CPU: 1 PID: 6899 Comm: syz-executor.3 Not tainted 6.0.0-rc1-next-20220818-syzkaller #0 BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1521 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 6899, name: syz-executor.3 preempt_count: 603, expected: 0 RCU nest depth: 0, expected: 0 4 locks held by syz-executor.3/6899: #0: ffff88802f175610 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff88802f175610 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash net/ipv4/udp.c:2014 [inline] #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash+0x1d5/0x730 net/ipv4/udp.c:2004 #2: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #2: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x22/0x4a0 net/core/sock_reuseport.c:346 #3: ffff888033842bb8 (clock-AF_INET6){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 irq event stamp: 2103 hardirqs last enabled at (2102): [] __up_console_sem+0xae/0xc0 kernel/printk/printk.c:264 hardirqs last disabled at (2103): [] dump_stack_lvl+0x2e/0x134 lib/dump_stack.c:139 softirqs last enabled at (1804): [] udpv6_destroy_sock+0x8e/0x230 net/ipv6/udp.c:1624 softirqs last disabled at (1806): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (1806): [] udp_lib_unhash net/ipv4/udp.c:2014 [inline] softirqs last disabled at (1806): [] udp_lib_unhash+0x1d5/0x730 net/ipv4/udp.c:2004 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 6899 Comm: syz-executor.3 Not tainted 6.0.0-rc1-next-20220818-syzkaller #0 ============================= [ BUG: Invalid wait context ] 6.0.0-rc1-next-20220818-syzkaller #0 Not tainted ----------------------------- syz-executor.3/6899 is trying to lock: ffff88807c908828 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] ffff88807c908828 (&mm->mmap_lock#2){++++}-{3:3}, at: __access_remote_vm+0xac/0x6f0 mm/memory.c:5461 other info that might help us debug this: context-{4:4} 4 locks held by syz-executor.3/6899: #0: ffff88802f175610 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff88802f175610 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash net/ipv4/udp.c:2014 [inline] #1: ffffc900014d2308 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash+0x1d5/0x730 net/ipv4/udp.c:2004 #2: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #2: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x22/0x4a0 net/core/sock_reuseport.c:346 #3: ffff888033842bb8 (clock-AF_INET6){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 stack backtrace: CPU: 1 PID: 6899 Comm: syz-executor.3 Not tainted 6.0.0-rc1-next-20220818-syzkaller #0 syz-executor.3[6899] cmdline: /root/syz-executor.3 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 print_lock_invalid_wait_context kernel/locking/lockdep.c:4705 [inline] check_wait_context kernel/locking/lockdep.c:4766 [inline] __lock_acquire.cold+0x322/0x3a7 kernel/locking/lockdep.c:5003 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 down_read_killable+0x9b/0x490 kernel/locking/rwsem.c:1522 mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] __access_remote_vm+0xac/0x6f0 mm/memory.c:5461 get_mm_cmdline.part.0+0x217/0x620 fs/proc/base.c:299 get_mm_cmdline fs/proc/base.c:367 [inline] get_task_cmdline_kernel+0x1d9/0x220 fs/proc/base.c:367 dump_stack_print_cmdline.part.0+0x82/0x150 lib/dump_stack.c:61 dump_stack_print_cmdline lib/dump_stack.c:89 [inline] dump_stack_print_info+0x185/0x190 lib/dump_stack.c:97 __dump_stack lib/dump_stack.c:121 [inline] dump_stack_lvl+0xc1/0x134 lib/dump_stack.c:140 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9896 down_read_killable+0x75/0x490 kernel/locking/rwsem.c:1521 mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] __access_remote_vm+0xac/0x6f0 mm/memory.c:5461 get_mm_cmdline.part.0+0x217/0x620 fs/proc/base.c:299 get_mm_cmdline fs/proc/base.c:367 [inline] get_task_cmdline_kernel+0x1d9/0x220 fs/proc/base.c:367 dump_stack_print_cmdline.part.0+0x82/0x150 lib/dump_stack.c:61 dump_stack_print_cmdline lib/dump_stack.c:89 [inline] dump_stack_print_info+0x185/0x190 lib/dump_stack.c:97 __dump_stack lib/dump_stack.c:121 [inline] dump_stack_lvl+0xc1/0x134 lib/dump_stack.c:140 __rcu_dereference_sk_user_data_with_flags include/net/sock.h:592 [inline] bpf_sk_reuseport_detach+0x156/0x190 kernel/bpf/reuseport_array.c:27 reuseport_detach_sock+0x8c/0x4a0 net/core/sock_reuseport.c:362 udp_lib_unhash net/ipv4/udp.c:2016 [inline] udp_lib_unhash+0x210/0x730 net/ipv4/udp.c:2004 sk_common_release+0xba/0x390 net/core/sock.c:3600 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:482 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff5cce3bebb Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fff26e9a050 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007ff5cce3bebb RDX: 00007ff5ccfa0590 RSI: ffffffffffffffff RDI: 0000000000000003 RBP: 00007ff5ccf9d980 R08: 0000000000000000 R09: 00007ff5ccfa0598 R10: 00007fff26e9a150 R11: 0000000000000293 R12: 0000000000069ca2 R13: 00007fff26e9a150 R14: 00007ff5ccf9bf80 R15: 0000000000000032 syz-executor.3[6899] cmdline: /root/syz-executor.3 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9896 down_read_killable+0x75/0x490 kernel/locking/rwsem.c:1521 mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] __access_remote_vm+0xac/0x6f0 mm/memory.c:5461 get_mm_cmdline.part.0+0x217/0x620 fs/proc/base.c:299 get_mm_cmdline fs/proc/base.c:367 [inline] get_task_cmdline_kernel+0x1d9/0x220 fs/proc/base.c:367 dump_stack_print_cmdline.part.0+0x82/0x150 lib/dump_stack.c:61 dump_stack_print_cmdline lib/dump_stack.c:89 [inline] dump_stack_print_info+0x185/0x190 lib/dump_stack.c:97 __dump_stack lib/dump_stack.c:121 [inline] dump_stack_lvl+0xc1/0x134 lib/dump_stack.c:140 __rcu_dereference_sk_user_data_with_flags include/net/sock.h:592 [inline] bpf_sk_reuseport_detach+0x156/0x190 kernel/bpf/reuseport_array.c:27 reuseport_detach_sock+0x8c/0x4a0 net/core/sock_reuseport.c:362 udp_lib_unhash net/ipv4/udp.c:2016 [inline] udp_lib_unhash+0x210/0x730 net/ipv4/udp.c:2004 sk_common_release+0xba/0x390 net/core/sock.c:3600 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:482 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff5cce3bebb Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fff26e9a050 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007ff5cce3bebb RDX: 00007ff5ccfa0590 RSI: ffffffffffffffff RDI: 0000000000000003 RBP: 00007ff5ccf9d980 R08: 0000000000000000 R09: 00007ff5ccfa0598 R10: 00007fff26e9a150 R11: 0000000000000293 R12: 0000000000069ca2 R13: 00007fff26e9a150 R14: 00007ff5ccf9bf80 R15: 0000000000000032 syz-executor.3[6899] cmdline: /root/syz-executor.3 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 __rcu_dereference_sk_user_data_with_flags include/net/sock.h:592 [inline] bpf_sk_reuseport_detach+0x156/0x190 kernel/bpf/reuseport_array.c:27 reuseport_detach_sock+0x8c/0x4a0 net/core/sock_reuseport.c:362 udp_lib_unhash net/ipv4/udp.c:2016 [inline] udp_lib_unhash+0x210/0x730 net/ipv4/udp.c:2004 sk_common_release+0xba/0x390 net/core/sock.c:3600 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:482 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1365 __fput+0x27c/0xa90 fs/file_table.c:320 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff5cce3bebb Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007fff26e9a050 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007ff5cce3bebb RDX: 00007ff5ccfa0590 RSI: ffffffffffffffff RDI: 0000000000000003 RBP: 00007ff5ccf9d980 R08: 0000000000000000 R09: 00007ff5ccfa0598 R10: 00007fff26e9a150 R11: 0000000000000293 R12: 0000000000069ca2 R13: 00007fff26e9a150 R14: 00007ff5ccf9bf80 R15: 0000000000000032