ci starts bisection 2023-04-03 11:13:31.896675607 +0000 UTC m=+19962.219418123 bisecting fixing commit since 6504d82f4440755d6fc1385532f84d0344243d61 building syzkaller on f371ed7e86e6a6b1b16a5700cd57055944574563 ensuring issue is reproducible on original commit 6504d82f4440755d6fc1385532f84d0344243d61 testing commit 6504d82f4440755d6fc1385532f84d0344243d61 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: de00237cf6e4744ec9eb885ba955e6b08a52a07b843b28746f503dbb2bb3b54c all runs: crashed: possible deadlock in ext4_xattr_get testing current HEAD 7e364e56293bb98cae1b55fd835f5991c4e96e7d testing commit 7e364e56293bb98cae1b55fd835f5991c4e96e7d gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 22098d12a2b054e1aa367435ff0cf9be008d0ce0a7be924b58d37742da49a362 all runs: crashed: possible deadlock in ext4_xattr_get revisions tested: 2, total time: 21m42.48560757s (build: 13m45.185045669s, test: 6m45.945913369s) the crash still happens on HEAD commit msg: Linux 6.3-rc5 crash: possible deadlock in ext4_xattr_get EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 without journal. Quota mode: none. ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc5-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/5561 is trying to acquire lock: ffff88806f6761c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_xattr_get+0x11d/0x6f0 fs/ext4/xattr.c:726 but task is already holding lock: ffff88806f676500 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] ffff88806f676500 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: chown_common+0x2bf/0x5a0 fs/open.c:764 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}: down_write+0x8e/0x200 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] ext4_xattr_inode_create fs/ext4/xattr.c:1525 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1608 [inline] ext4_xattr_set_entry+0x2778/0x39d0 fs/ext4/xattr.c:1737 ext4_xattr_ibody_set+0xfa/0x330 fs/ext4/xattr.c:2289 ext4_xattr_set_handle+0x71c/0x10f0 fs/ext4/xattr.c:2446 ext4_xattr_set+0x123/0x2e0 fs/ext4/xattr.c:2560 __vfs_setxattr+0x109/0x160 fs/xattr.c:203 __vfs_setxattr_noperm+0xee/0x590 fs/xattr.c:237 vfs_setxattr+0x111/0x2d0 fs/xattr.c:324 setxattr+0x106/0x120 fs/xattr.c:632 path_setxattr+0x13c/0x170 fs/xattr.c:651 __do_sys_setxattr fs/xattr.c:667 [inline] __se_sys_setxattr fs/xattr.c:663 [inline] __x64_sys_setxattr+0xbb/0x150 fs/xattr.c:663 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 -> #0 (&ei->xattr_sem){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1ab/0x520 kernel/locking/lockdep.c:5634 down_read+0x39/0x50 kernel/locking/rwsem.c:1520 ext4_xattr_get+0x11d/0x6f0 fs/ext4/xattr.c:726 __vfs_getxattr+0xe6/0x140 fs/xattr.c:426 cap_inode_need_killpriv+0x37/0x50 security/commoncap.c:301 security_inode_need_killpriv+0x34/0x70 security/security.c:1492 notify_change+0x410/0xda0 fs/attr.c:415 chown_common+0x4a0/0x5a0 fs/open.c:774 do_fchownat+0xcf/0x140 fs/open.c:805 __do_sys_fchownat fs/open.c:820 [inline] __se_sys_fchownat fs/open.c:817 [inline] __x64_sys_fchownat+0xb5/0x150 fs/open.c:817 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ea_inode->i_rwsem#7/1); lock(&ei->xattr_sem); lock(&ea_inode->i_rwsem#7/1); lock(&ei->xattr_sem); *** DEADLOCK *** 2 locks held by syz-executor.0/5561: #0: ffff888026aa6460 (sb_writers#5){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:802 #1: ffff88806f676500 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff88806f676500 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: chown_common+0x2bf/0x5a0 fs/open.c:764 stack backtrace: CPU: 1 PID: 5561 Comm: syz-executor.0 Not tainted 6.3.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x60/0xa0 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3098 [inline] check_prevs_add kernel/locking/lockdep.c:3217 [inline] validate_chain kernel/locking/lockdep.c:3832 [inline] __lock_acquire+0x2ec7/0x5d40 kernel/locking/lockdep.c:5056 lock_acquire kernel/locking/lockdep.c:5669 [inline] lock_acquire+0x1ab/0x520 kernel/locking/lockdep.c:5634 down_read+0x39/0x50 kernel/locking/rwsem.c:1520 ext4_xattr_get+0x11d/0x6f0 fs/ext4/xattr.c:726 __vfs_getxattr+0xe6/0x140 fs/xattr.c:426 cap_inode_need_killpriv+0x37/0x50 security/commoncap.c:301 security_inode_need_killpriv+0x34/0x70 security/security.c:1492 notify_change+0x410/0xda0 fs/attr.c:415 chown_common+0x4a0/0x5a0 fs/open.c:774 do_fchownat+0xcf/0x140 fs/open.c:805 __do_sys_fchownat fs/open.c:820 [inline] __se_sys_fchownat fs/open.c:817 [inline] __x64_sys_fchownat+0xb5/0x150 fs/open.c:817 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 RIP: 0033:0x7fae2d4893c9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fae2e51e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000104 RAX: ffffffffffffffda RBX: 00007fae2d59bf80 RCX: 00007fae2d4893c9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007fae2d4e433f R08: 0000000000001000 R09: 0000000000000000 R10: 000000000000ee01 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc3530511f R14: 00007fae2e51e300 R15: 0000000000022000