====================================================== WARNING: possible circular locking dependency detected 5.13.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor501/8626 is trying to acquire lock: ffff888039ffec10 ( &sb->s_type->i_mutex_key#13 ){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:774 [inline] , at: __sock_release+0x86/0x280 net/socket.c:647 but task is already holding lock: ffff888028d5b520 (sk_lock-AF_TIPC ){+.+.}-{0:0} , at: lock_sock include/net/sock.h:1613 [inline] , at: sock_setsockopt+0x1e3/0x2490 net/core/sock.c:980 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ( sk_lock-AF_TIPC){+.+.}-{0:0} : lock_sock_nested+0xca/0x120 net/core/sock.c:3168 lock_sock include/net/sock.h:1613 [inline] tipc_release+0xc2/0x1a00 net/tipc/socket.c:637 __sock_release+0xcd/0x280 net/socket.c:648 sock_close+0x18/0x20 net/socket.c:1300 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 ( &sb->s_type->i_mutex_key#13 ){+.+.}-{3:3} : check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 down_write+0x92/0x150 kernel/locking/rwsem.c:1406 inode_lock include/linux/fs.h:774 [inline] __sock_release+0x86/0x280 net/socket.c:647 sock_close+0x18/0x20 net/socket.c:1300 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 get_signal+0x1bb0/0x2150 kernel/signal.c:2569 arch_do_signal_or_restart+0x2a9/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_TIPC ); lock( &sb->s_type->i_mutex_key#13 ); lock( sk_lock-AF_TIPC); lock(&sb->s_type->i_mutex_key #13); *** DEADLOCK *** 1 lock held by syz-executor501/8626: #0: ffff888028d5b520 (sk_lock-AF_TIPC ){+.+.}-{0:0} , at: lock_sock include/net/sock.h:1613 [inline] , at: sock_setsockopt+0x1e3/0x2490 net/core/sock.c:980 stack backtrace: CPU: 1 PID: 8626 Comm: syz-executor501 Not tainted 5.13.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:79 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:96 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2131 check_prev_add kernel/locking/lockdep.c:3051 [inline] check_prevs_add kernel/locking/lockdep.c:3174 [inline] validate_chain kernel/locking/lockdep.c:3789 [inline] __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 down_write+0x92/0x150 kernel/locking/rwsem.c:1406 inode_lock include/linux/fs.h:774 [inline] __sock_release+0x86/0x280 net/socket.c:647 sock_close+0x18/0x20 net/socket.c:1300 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 get_signal+0x1bb0/0x2150 kernel/signal.c:2569 arch_do_signal_or_restart+0x2a9/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x44ed49 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f943c11b208 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: fffffffffffffff2 RBX: 00000000004cd4a8 RCX: 000000000044ed49 RDX: 0000000000000025 RSI: 0000000000000001 RDI: 0000000000000005 RBP: 00000000004cd4a0 R08: 0000000000000008 R09: 0000000000000000 R10: 00000000200001c0 R11: 0000000000000246 R12: 00000000004cd4ac R13: 00007ffc4809da7f R14: 00007f943c11b300 R15: 0000000000022000