BUG: sleeping function called from invalid context at kernel/workqueue.c:3010 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 4097, name: syz-executor.0 preempt_count: 201, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz-executor.0/4097: #0: ffff8880757bc410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:741 [inline] #0: ffff8880757bc410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x76/0x270 net/socket.c:649 #1: ffff888078cca770 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1691 [inline] #1: ffff888078cca770 (sk_lock-AF_INET6){+.+.}-{0:0}, at: tcp_close+0x10/0x70 net/ipv4/tcp.c:2908 #2: ffff888078cca6f0 (slock-AF_INET6){+...}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #2: ffff888078cca6f0 (slock-AF_INET6){+...}-{2:2}, at: __tcp_close+0x65d/0x1200 net/ipv4/tcp.c:2830 Preemption disabled at: [] local_bh_disable include/linux/bottom_half.h:20 [inline] [] __tcp_close+0x655/0x1200 net/ipv4/tcp.c:2829 CPU: 1 PID: 4097 Comm: syz-executor.0 Not tainted 5.18.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9794 start_flush_work kernel/workqueue.c:3010 [inline] __flush_work+0xdd/0xa30 kernel/workqueue.c:3074 __cancel_work_timer+0x315/0x460 kernel/workqueue.c:3162 sock_map_destroy+0x242/0x520 net/core/sock_map.c:1581 inet_csk_destroy_sock+0x156/0x380 net/ipv4/inet_connection_sock.c:1130 __tcp_close+0xc06/0x1200 net/ipv4/tcp.c:2897 tcp_close+0x1b/0x70 net/ipv4/tcp.c:2909 sock_map_close+0x292/0x530 net/core/sock_map.c:1607 inet_release+0xef/0x210 net/ipv4/af_inet.c:428 __sock_release+0xbb/0x270 net/socket.c:650 sock_close+0xf/0x20 net/socket.c:1365 __fput+0x1f5/0x8c0 fs/file_table.c:317 task_work_run+0xc0/0x160 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+0x46/0xb0 RIP: 0033:0x7fd53fc3bd4b 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:00007ffcde2d24a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fd53fc3bd4b RDX: 00007fd53fda0608 RSI: ffffffffffffffff RDI: 0000000000000004 RBP: 00007fd53fd9d960 R08: 0000000000000000 R09: 00007fd53fda0610 R10: 00007ffcde2d25a0 R11: 0000000000000293 R12: 0000000000013bbc R13: 00007ffcde2d25a0 R14: 00007fd53fd9bf60 R15: 0000000000000032