============================= 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.5/15772: #0: ffff888034f27410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888034f27410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffffc900014fd238 (&table->hash[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffffc900014fd238 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash net/ipv4/udp.c:2014 [inline] #1: ffffc900014fd238 (&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: ffff88807cc85bb8 (clock-AF_INET6){++.-}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 stack backtrace: CPU: 0 PID: 15772 Comm: syz-executor.5 Not tainted 6.0.0-rc1-next-20220818-syzkaller #0 ===================================================== WARNING: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected 6.0.0-rc1-next-20220818-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.5/15772 [HC0[0]:SC0[6]:HE0:SE0] is trying to acquire: ffff88801cc532f0 (&mm->arg_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] ffff88801cc532f0 (&mm->arg_lock){+.+.}-{2:2}, at: get_mm_cmdline.part.0+0x90/0x620 fs/proc/base.c:264 and this task is already holding: ffff88807cc85bb8 (clock-AF_INET6){++.-}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 which would create a new lock dependency: (clock-AF_INET6){++.-}-{2:2} -> (&mm->arg_lock){+.+.}-{2:2} but this new dependency connects a SOFTIRQ-READ-irq-safe lock: (clock-AF_INET6){++.-}-{2:2} ... which became SOFTIRQ-READ-irq-safe at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline] _raw_read_lock_bh+0x3b/0x70 kernel/locking/spinlock.c:252 rds_tcp_write_space+0x25/0x690 net/rds/tcp_send.c:184 tcp_new_space net/ipv4/tcp_input.c:5458 [inline] tcp_check_space+0x117/0x800 net/ipv4/tcp_input.c:5477 tcp_data_snd_check net/ipv4/tcp_input.c:5486 [inline] tcp_rcv_established+0x8ba/0x20e0 net/ipv4/tcp_input.c:5994 tcp_v6_do_rcv+0x810/0x13c0 net/ipv6/tcp_ipv6.c:1479 tcp_v6_rcv+0x2e51/0x37e0 net/ipv6/tcp_ipv6.c:1738 ip6_protocol_deliver_rcu+0x2f4/0x1950 net/ipv6/ip6_input.c:439 ip6_input_finish+0x14c/0x2c0 net/ipv6/ip6_input.c:484 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_input+0x9c/0xd0 net/ipv6/ip6_input.c:493 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ipv6_rcv+0x24c/0x380 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5485 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5599 process_backlog+0x3a0/0x7c0 net/core/dev.c:5927 __napi_poll+0xb3/0x6d0 net/core/dev.c:6511 napi_poll net/core/dev.c:6578 [inline] net_rx_action+0x9c1/0xd90 net/core/dev.c:6689 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 do_softirq.part.0+0xde/0x130 kernel/softirq.c:472 do_softirq kernel/softirq.c:464 [inline] __local_bh_enable_ip+0x102/0x120 kernel/softirq.c:396 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:776 [inline] ip6_finish_output2+0x5b2/0x1520 net/ipv6/ip6_output.c:135 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x690/0x1160 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1ed/0x540 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_xmit+0x11f3/0x1c50 net/ipv6/ip6_output.c:343 inet6_csk_xmit+0x3b1/0x6c0 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x1967/0x3800 net/ipv4/tcp_output.c:1402 __tcp_send_ack.part.0+0x3a7/0x760 net/ipv4/tcp_output.c:3981 __tcp_send_ack net/ipv4/tcp_output.c:3987 [inline] tcp_send_ack+0x7d/0xa0 net/ipv4/tcp_output.c:3987 __tcp_ack_snd_check+0x156/0x9c0 net/ipv4/tcp_input.c:5511 tcp_ack_snd_check net/ipv4/tcp_input.c:5557 [inline] tcp_rcv_established+0x90e/0x20e0 net/ipv4/tcp_input.c:5995 tcp_v6_do_rcv+0x810/0x13c0 net/ipv6/tcp_ipv6.c:1479 sk_backlog_rcv include/net/sock.h:1075 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2850 release_sock+0x54/0x1b0 net/core/sock.c:3406 inet_wait_for_connect net/ipv4/af_inet.c:593 [inline] __inet_stream_connect+0x753/0xec0 net/ipv4/af_inet.c:685 inet_stream_connect+0x53/0xa0 net/ipv4/af_inet.c:724 mptcp_stream_connect+0x1d3/0xaf0 net/mptcp/protocol.c:3521 __sys_connect_file+0x14f/0x190 net/socket.c:1976 __sys_connect+0x161/0x190 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x6f/0xb0 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd to a SOFTIRQ-READ-irq-unsafe lock: (&mm->arg_lock){+.+.}-{2:2} ... which became SOFTIRQ-READ-irq-unsafe at: ... lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_cmdline+0xb3/0x350 mm/util.c:1083 kstrdup_quotable_cmdline+0x6f/0x1f0 lib/string_helpers.c:631 __report_access+0x47/0x250 security/yama/yama_lsm.c:57 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 other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->arg_lock); local_irq_disable(); lock(clock-AF_INET6); lock(&mm->arg_lock); lock(clock-AF_INET6); *** DEADLOCK *** 4 locks held by syz-executor.5/15772: #0: ffff888034f27410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888034f27410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffffc900014fd238 (&table->hash[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffffc900014fd238 (&table->hash[i].lock){+...}-{2:2}, at: udp_lib_unhash net/ipv4/udp.c:2014 [inline] #1: ffffc900014fd238 (&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: ffff88807cc85bb8 (clock-AF_INET6){++.-}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 the dependencies between SOFTIRQ-READ-irq-safe lock and the holding lock: -> (clock-AF_INET6){++.-}-{2:2} { HARDIRQ-ON-W at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline] _raw_write_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:334 sock_orphan include/net/sock.h:2040 [inline] sk_common_release+0xc2/0x390 net/core/sock.c:3614 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 HARDIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline] _raw_read_lock_bh+0x3b/0x70 kernel/locking/spinlock.c:252 sock_i_uid+0x1b/0xb0 net/core/sock.c:2488 udp_lib_lport_inuse+0x32/0x490 net/ipv4/udp.c:140 udp_lib_get_port+0x831/0x18c0 net/ipv4/udp.c:306 __inet6_bind+0x621/0x1b20 net/ipv6/af_inet6.c:406 inet6_bind+0x173/0x220 net/ipv6/af_inet6.c:465 __sys_bind+0x1e9/0x250 net/socket.c:1776 __do_sys_bind net/socket.c:1787 [inline] __se_sys_bind net/socket.c:1785 [inline] __x64_sys_bind+0x6f/0xb0 net/socket.c:1785 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd IN-SOFTIRQ-R at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline] _raw_read_lock_bh+0x3b/0x70 kernel/locking/spinlock.c:252 rds_tcp_write_space+0x25/0x690 net/rds/tcp_send.c:184 tcp_new_space net/ipv4/tcp_input.c:5458 [inline] tcp_check_space+0x117/0x800 net/ipv4/tcp_input.c:5477 tcp_data_snd_check net/ipv4/tcp_input.c:5486 [inline] tcp_rcv_established+0x8ba/0x20e0 net/ipv4/tcp_input.c:5994 tcp_v6_do_rcv+0x810/0x13c0 net/ipv6/tcp_ipv6.c:1479 tcp_v6_rcv+0x2e51/0x37e0 net/ipv6/tcp_ipv6.c:1738 ip6_protocol_deliver_rcu+0x2f4/0x1950 net/ipv6/ip6_input.c:439 ip6_input_finish+0x14c/0x2c0 net/ipv6/ip6_input.c:484 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_input+0x9c/0xd0 net/ipv6/ip6_input.c:493 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ipv6_rcv+0x24c/0x380 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5485 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5599 process_backlog+0x3a0/0x7c0 net/core/dev.c:5927 __napi_poll+0xb3/0x6d0 net/core/dev.c:6511 napi_poll net/core/dev.c:6578 [inline] net_rx_action+0x9c1/0xd90 net/core/dev.c:6689 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 do_softirq.part.0+0xde/0x130 kernel/softirq.c:472 do_softirq kernel/softirq.c:464 [inline] __local_bh_enable_ip+0x102/0x120 kernel/softirq.c:396 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:776 [inline] ip6_finish_output2+0x5b2/0x1520 net/ipv6/ip6_output.c:135 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x690/0x1160 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1ed/0x540 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_xmit+0x11f3/0x1c50 net/ipv6/ip6_output.c:343 inet6_csk_xmit+0x3b1/0x6c0 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x1967/0x3800 net/ipv4/tcp_output.c:1402 __tcp_send_ack.part.0+0x3a7/0x760 net/ipv4/tcp_output.c:3981 __tcp_send_ack net/ipv4/tcp_output.c:3987 [inline] tcp_send_ack+0x7d/0xa0 net/ipv4/tcp_output.c:3987 __tcp_ack_snd_check+0x156/0x9c0 net/ipv4/tcp_input.c:5511 tcp_ack_snd_check net/ipv4/tcp_input.c:5557 [inline] tcp_rcv_established+0x90e/0x20e0 net/ipv4/tcp_input.c:5995 tcp_v6_do_rcv+0x810/0x13c0 net/ipv6/tcp_ipv6.c:1479 sk_backlog_rcv include/net/sock.h:1075 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2850 release_sock+0x54/0x1b0 net/core/sock.c:3406 inet_wait_for_connect net/ipv4/af_inet.c:593 [inline] __inet_stream_connect+0x753/0xec0 net/ipv4/af_inet.c:685 inet_stream_connect+0x53/0xa0 net/ipv4/af_inet.c:724 mptcp_stream_connect+0x1d3/0xaf0 net/mptcp/protocol.c:3521 __sys_connect_file+0x14f/0x190 net/socket.c:1976 __sys_connect+0x161/0x190 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x6f/0xb0 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline] _raw_write_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:334 sock_orphan include/net/sock.h:2040 [inline] sk_common_release+0xc2/0x390 net/core/sock.c:3614 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 INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline] _raw_read_lock_bh+0x3b/0x70 kernel/locking/spinlock.c:252 sock_i_uid+0x1b/0xb0 net/core/sock.c:2488 udp_lib_lport_inuse+0x32/0x490 net/ipv4/udp.c:140 udp_lib_get_port+0x831/0x18c0 net/ipv4/udp.c:306 __inet6_bind+0x621/0x1b20 net/ipv6/af_inet6.c:406 inet6_bind+0x173/0x220 net/ipv6/af_inet6.c:465 __sys_bind+0x1e9/0x250 net/socket.c:1776 __do_sys_bind net/socket.c:1787 [inline] __se_sys_bind net/socket.c:1785 [inline] __x64_sys_bind+0x6f/0xb0 net/socket.c:1785 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd } ... key at: [] af_callback_keys+0xa0/0x300 the dependencies between the lock to be acquired and SOFTIRQ-READ-irq-unsafe lock: -> (&mm->arg_lock){+.+.}-{2:2} { HARDIRQ-ON-W at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_cmdline+0xb3/0x350 mm/util.c:1083 kstrdup_quotable_cmdline+0x6f/0x1f0 lib/string_helpers.c:631 __report_access+0x47/0x250 security/yama/yama_lsm.c:57 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 SOFTIRQ-ON-W at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_cmdline+0xb3/0x350 mm/util.c:1083 kstrdup_quotable_cmdline+0x6f/0x1f0 lib/string_helpers.c:631 __report_access+0x47/0x250 security/yama/yama_lsm.c:57 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 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_cmdline+0xb3/0x350 mm/util.c:1083 kstrdup_quotable_cmdline+0x6f/0x1f0 lib/string_helpers.c:631 __report_access+0x47/0x250 security/yama/yama_lsm.c:57 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 } ... key at: [] __key.293+0x0/0x40 ... acquired at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_mm_cmdline.part.0+0x90/0x620 fs/proc/base.c:264 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 stack backtrace: CPU: 0 PID: 15772 Comm: syz-executor.5 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: 15772, name: syz-executor.5 preempt_count: 604, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. irq event stamp: 2795 hardirqs last enabled at (2794): [] __up_console_sem+0xae/0xc0 kernel/printk/printk.c:264 hardirqs last disabled at (2795): [] dump_stack_lvl+0x2e/0x134 lib/dump_stack.c:139 softirqs last enabled at (2496): [] udpv6_destroy_sock+0x8e/0x230 net/ipv6/udp.c:1624 softirqs last disabled at (2498): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (2498): [] udp_lib_unhash net/ipv4/udp.c:2014 [inline] softirqs last disabled at (2498): [] udp_lib_unhash+0x1d5/0x730 net/ipv4/udp.c:2004 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 15772 Comm: syz-executor.5 Not tainted 6.0.0-rc1-next-20220818-syzkaller #0 syz-executor.5[15772] cmdline: /root/syz-executor.5 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 print_bad_irq_dependency kernel/locking/lockdep.c:2609 [inline] check_irq_usage.cold+0x4c1/0x6b0 kernel/locking/lockdep.c:2848 check_prev_add kernel/locking/lockdep.c:3099 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a5b/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_mm_cmdline.part.0+0x90/0x620 fs/proc/base.c:264 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:0x7f458a83bebb 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:00007ffdb8af9750 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f458a83bebb RDX: 00007f458a9a1e18 RSI: ffffffffffffffff RDI: 0000000000000004 RBP: 00007f458a99d980 R08: 0000000000000000 R09: 00007f458a9a1e20 R10: 00007ffdb8af9850 R11: 0000000000000293 R12: 00000000000e4d00 R13: 00007ffdb8af9850 R14: 00007f458a99bf80 R15: 0000000000000032 syz-executor.5[15772] cmdline: /root/syz-executor.5 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_bad_irq_dependency kernel/locking/lockdep.c:2609 [inline] check_irq_usage.cold+0x4c1/0x6b0 kernel/locking/lockdep.c:2848 check_prev_add kernel/locking/lockdep.c:3099 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3829 [inline] __lock_acquire+0x2a5b/0x56d0 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] get_mm_cmdline.part.0+0x90/0x620 fs/proc/base.c:264 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:0x7f458a83bebb 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:00007ffdb8af9750 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f458a83bebb RDX: 00007f458a9a1e18 RSI: ffffffffffffffff RDI: 0000000000000004 RBP: 00007f458a99d980 R08: 0000000000000000 R09: 00007f458a9a1e20 R10: 00007ffdb8af9850 R11: 0000000000000293 R12: 00000000000e4d00 R13: 00007ffdb8af9850 R14: 00007f458a99bf80 R15: 0000000000000032 syz-executor.5[15772] cmdline: /root/syz-executor.5 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:0x7f458a83bebb 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:00007ffdb8af9750 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f458a83bebb RDX: 00007f458a9a1e18 RSI: ffffffffffffffff RDI: 0000000000000004 RBP: 00007f458a99d980 R08: 0000000000000000 R09: 00007f458a9a1e20 R10: 00007ffdb8af9850 R11: 0000000000000293 R12: 00000000000e4d00 R13: 00007ffdb8af9850 R14: 00007f458a99bf80 R15: 0000000000000032