============================= 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 5 locks held by syz-executor.2/16149: #0: ffff888074d65c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888074d65c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffff88801e32a9a0 (&net->sctp.addr_wq_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffff88801e32a9a0 (&net->sctp.addr_wq_lock){+.-.}-{2:2}, at: sctp_close+0x464/0x940 net/sctp/socket.c:1541 #2: ffff88807d1aa9f0 (slock-AF_INET/1){+.-.}-{2:2}, at: sctp_close+0x471/0x940 net/sctp/socket.c:1542 #3: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #3: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x22/0x4a0 net/core/sock_reuseport.c:346 #4: ffff88807d1aacf8 (clock-AF_INET){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 stack backtrace: CPU: 1 PID: 16149 Comm: syz-executor.2 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: 16149, name: syz-executor.2 preempt_count: 804, expected: 0 RCU nest depth: 0, expected: 0 5 locks held by syz-executor.2/16149: #0: ffff888074d65c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888074d65c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffff88801e32a9a0 (&net->sctp.addr_wq_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffff88801e32a9a0 (&net->sctp.addr_wq_lock){+.-.}-{2:2}, at: sctp_close+0x464/0x940 net/sctp/socket.c:1541 #2: ffff88807d1aa9f0 (slock-AF_INET/1){+.-.}-{2:2}, at: sctp_close+0x471/0x940 net/sctp/socket.c:1542 #3: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #3: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x22/0x4a0 net/core/sock_reuseport.c:346 #4: ffff88807d1aacf8 (clock-AF_INET){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 irq event stamp: 5253 hardirqs last enabled at (5252): [] __up_console_sem+0xae/0xc0 kernel/printk/printk.c:264 hardirqs last disabled at (5253): [] dump_stack_lvl+0x2e/0x134 lib/dump_stack.c:139 softirqs last enabled at (4900): [] sctp_close+0x442/0x940 net/sctp/socket.c:1534 softirqs last disabled at (4902): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (4902): [] sctp_close+0x464/0x940 net/sctp/socket.c:1541 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 16149 Comm: syz-executor.2 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.2/16149 is trying to lock: ffff888026f2b228 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] ffff888026f2b228 (&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} 5 locks held by syz-executor.2/16149: #0: ffff888074d65c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888074d65c10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:649 #1: ffff88801e32a9a0 (&net->sctp.addr_wq_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #1: ffff88801e32a9a0 (&net->sctp.addr_wq_lock){+.-.}-{2:2}, at: sctp_close+0x464/0x940 net/sctp/socket.c:1541 #2: ffff88807d1aa9f0 (slock-AF_INET/1){+.-.}-{2:2}, at: sctp_close+0x471/0x940 net/sctp/socket.c:1542 #3: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:354 [inline] #3: ffffffff8d7beb78 (reuseport_lock){+...}-{2:2}, at: reuseport_detach_sock+0x22/0x4a0 net/core/sock_reuseport.c:346 #4: ffff88807d1aacf8 (clock-AF_INET){++..}-{2:2}, at: bpf_sk_reuseport_detach+0x26/0x190 kernel/bpf/reuseport_array.c:26 stack backtrace: CPU: 1 PID: 16149 Comm: syz-executor.2 Not tainted 6.0.0-rc1-next-20220818-syzkaller #0 syz-executor.2[16149] cmdline: /root/syz-executor.2 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 __sctp_unhash_endpoint net/sctp/input.c:820 [inline] sctp_unhash_endpoint+0x196/0x320 net/sctp/input.c:831 sctp_endpoint_free+0x5d/0x80 net/sctp/endpointola.c:181 sctp_destroy_sock+0xa2/0x3d0 net/sctp/socket.c:5095 sk_common_release+0x64/0x390 net/core/sock.c:3590 sctp_close+0x4d8/0x940 net/sctp/socket.c:1548 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 __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:0x7fdf14e3bebb 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:00007ffc0f46d210 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fdf14e3bebb RDX: 0000000000000000 RSI: 0000001b2e62194c RDI: 0000000000000004 RBP: 00007fdf14f9d980 R08: 0000000000000000 R09: 000000002916b569 R10: 0000000000000000 R11: 0000000000000293 R12: 00000000000ea2fe R13: 00007ffc0f46d310 R14: 00007ffc0f46d330 R15: 0000000000000032 syz-executor.2[16149] cmdline: /root/syz-executor.2 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 __sctp_unhash_endpoint net/sctp/input.c:820 [inline] sctp_unhash_endpoint+0x196/0x320 net/sctp/input.c:831 sctp_endpoint_free+0x5d/0x80 net/sctp/endpointola.c:181 sctp_destroy_sock+0xa2/0x3d0 net/sctp/socket.c:5095 sk_common_release+0x64/0x390 net/core/sock.c:3590 sctp_close+0x4d8/0x940 net/sctp/socket.c:1548 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 __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:0x7fdf14e3bebb 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:00007ffc0f46d210 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fdf14e3bebb RDX: 0000000000000000 RSI: 0000001b2e62194c RDI: 0000000000000004 RBP: 00007fdf14f9d980 R08: 0000000000000000 R09: 000000002916b569 R10: 0000000000000000 R11: 0000000000000293 R12: 00000000000ea2fe R13: 00007ffc0f46d310 R14: 00007ffc0f46d330 R15: 0000000000000032 BUG: sleeping function called from invalid context at mm/gup.c:1215 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 16149, name: syz-executor.2 preempt_count: 804, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. irq event stamp: 5253 hardirqs last enabled at (5252): [] __up_console_sem+0xae/0xc0 kernel/printk/printk.c:264 hardirqs last disabled at (5253): [] dump_stack_lvl+0x2e/0x134 lib/dump_stack.c:139 softirqs last enabled at (4900): [] sctp_close+0x442/0x940 net/sctp/socket.c:1534 softirqs last disabled at (4902): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (4902): [] sctp_close+0x464/0x940 net/sctp/socket.c:1541 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 16149 Comm: syz-executor.2 Tainted: G W 6.0.0-rc1-next-20220818-syzkaller #0 syz-executor.2[16149] cmdline: /root/syz-executor.2 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 __get_user_pages+0x451/0xfd0 mm/gup.c:1215 __get_user_pages_locked mm/gup.c:1423 [inline] __get_user_pages_remote+0x18f/0x830 mm/gup.c:2133 get_user_pages_remote+0x84/0xc0 mm/gup.c:2206 __access_remote_vm+0x275/0x6f0 mm/memory.c:5470 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 __sctp_unhash_endpoint net/sctp/input.c:820 [inline] sctp_unhash_endpoint+0x196/0x320 net/sctp/input.c:831 sctp_endpoint_free+0x5d/0x80 net/sctp/endpointola.c:181 sctp_destroy_sock+0xa2/0x3d0 net/sctp/socket.c:5095 sk_common_release+0x64/0x390 net/core/sock.c:3590 sctp_close+0x4d8/0x940 net/sctp/socket.c:1548 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 __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:0x7fdf14e3bebb 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:00007ffc0f46d210 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fdf14e3bebb RDX: 0000000000000000 RSI: 0000001b2e62194c RDI: 0000000000000004 RBP: 00007fdf14f9d980 R08: 0000000000000000 R09: 000000002916b569 R10: 0000000000000000 R11: 0000000000000293 R12: 00000000000ea2fe R13: 00007ffc0f46d310 R14: 00007ffc0f46d330 R15: 0000000000000032 syz-executor.2[16149] cmdline: /root/syz-executor.2 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 __sctp_unhash_endpoint net/sctp/input.c:820 [inline] sctp_unhash_endpoint+0x196/0x320 net/sctp/input.c:831 sctp_endpoint_free+0x5d/0x80 net/sctp/endpointola.c:181 sctp_destroy_sock+0xa2/0x3d0 net/sctp/socket.c:5095 sk_common_release+0x64/0x390 net/core/sock.c:3590 sctp_close+0x4d8/0x940 net/sctp/socket.c:1548 inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 __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:0x7fdf14e3bebb 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:00007ffc0f46d210 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fdf14e3bebb RDX: 0000000000000000 RSI: 0000001b2e62194c RDI: 0000000000000004 RBP: 00007fdf14f9d980 R08: 0000000000000000 R09: 000000002916b569 R10: 0000000000000000 R11: 0000000000000293 R12: 00000000000ea2fe R13: 00007ffc0f46d310 R14: 00007ffc0f46d330 R15: 0000000000000032