ci starts bisection 2023-05-07 12:08:11.008410183 +0000 UTC m=+111921.270062009 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: cca8c4150ba84c89c393ac9fc39e24243d6067e1e2ee05aeace79d5b548ee979 all runs: crashed: possible deadlock in ext4_xattr_get testing current HEAD fc4354c6e5c21257cf4a50b32f7c11c7d65c55b3 testing commit fc4354c6e5c21257cf4a50b32f7c11c7d65c55b3 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: de747bede804a4dc402b11ec73e4e5e6bbc725495fa6c2e70d7ead2e18e2e887 all runs: crashed: possible deadlock in ext4_xattr_get crash still not fixed/happens on the oldest tested release revisions tested: 2, total time: 21m44.446189122s (build: 13m37.691172849s, test: 7m14.602938696s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Merge tag 'mm-stable-2023-05-06-10-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm crash: possible deadlock in ext4_xattr_get ====================================================== WARNING: possible circular locking dependency detected 6.3.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/5377 is trying to acquire lock: ffff888070b290c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_xattr_get+0x11d/0x6f0 fs/ext4/xattr.c:726 but task is already holding lock: ffff888070b29400 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:775 [inline] ffff888070b29400 (&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:775 [inline] ext4_xattr_inode_create fs/ext4/xattr.c:1524 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1607 [inline] ext4_xattr_set_entry+0x2778/0x39d0 fs/ext4/xattr.c:1736 ext4_xattr_ibody_set+0xfa/0x330 fs/ext4/xattr.c:2288 ext4_xattr_set_handle+0x71c/0x10f0 fs/ext4/xattr.c:2445 ext4_xattr_set+0x123/0x2e0 fs/ext4/xattr.c:2559 __vfs_setxattr+0x109/0x160 fs/xattr.c:201 __vfs_setxattr_noperm+0xee/0x590 fs/xattr.c:235 vfs_setxattr+0x111/0x2d0 fs/xattr.c:322 setxattr+0x106/0x120 fs/xattr.c:653 path_setxattr+0x13c/0x170 fs/xattr.c:672 __do_sys_setxattr fs/xattr.c:688 [inline] __se_sys_setxattr fs/xattr.c:684 [inline] __x64_sys_setxattr+0xbb/0x150 fs/xattr.c:684 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:3108 [inline] check_prevs_add kernel/locking/lockdep.c:3227 [inline] validate_chain kernel/locking/lockdep.c:3842 [inline] __lock_acquire+0x2f21/0x5df0 kernel/locking/lockdep.c:5074 lock_acquire kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x1ad/0x520 kernel/locking/lockdep.c:5656 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:424 cap_inode_need_killpriv+0x37/0x50 security/commoncap.c:301 security_inode_need_killpriv+0x34/0x70 security/security.c:2329 notify_change+0x410/0xda0 fs/attr.c:416 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); rlock(&ei->xattr_sem); *** DEADLOCK *** 2 locks held by syz-executor.0/5377: #0: ffff88802ae7e460 (sb_writers#5){.+.+}-{0:0}, at: do_fchownat+0xb8/0x140 fs/open.c:802 #1: ffff888070b29400 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:775 [inline] #1: ffff888070b29400 (&ea_inode->i_rwsem#7/1){+.+.}-{3:3}, at: chown_common+0x2bf/0x5a0 fs/open.c:764 stack backtrace: CPU: 1 PID: 5377 Comm: syz-executor.0 Not tainted 6.3.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/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:2188 check_prev_add kernel/locking/lockdep.c:3108 [inline] check_prevs_add kernel/locking/lockdep.c:3227 [inline] validate_chain kernel/locking/lockdep.c:3842 [inline] __lock_acquire+0x2f21/0x5df0 kernel/locking/lockdep.c:5074 lock_acquire kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x1ad/0x520 kernel/locking/lockdep.c:5656 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:424 cap_inode_need_killpriv+0x37/0x50 security/commoncap.c:301 security_inode_need_killpriv+0x34/0x70 security/security.c:2329 notify_change+0x410/0xda0 fs/attr.c:416 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:0x7f61bfa893c9 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:00007f61c0c59168 EFLAGS: 00000246 ORIG_RAX: 0000000000000104 RAX: ffffffffffffffda RBX: 00007f61bfb9bf80 RCX: 00007f61bfa893c9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007f61bfae433f R08: 0000000000001000 R09: 0000000000000000 R10: 000000000000ee01 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff9ead6e4f R14: 00007f61c0c59300 R15: 0000000000022000