syzbot


WARNING: locking bug in ext4_xattr_inode_update_ref

Status: upstream: reported C repro on 2023/01/21 20:53
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+d3c53f53f16808163b78@syzkaller.appspotmail.com
First crash: 459d, last: 455d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING: locking bug in ext4_xattr_inode_update_ref ext4 C 2 428d 464d 0/1 upstream: reported C repro on 2023/01/16 15:56
upstream WARNING: locking bug in ext4_xattr_inode_update_ref ext4 C error 4 342d 469d 22/26 fixed on 2023/07/01 16:05
upstream WARNING: locking bug in ext4_xattr_inode_update_ref (3) ext4 C 1 3d23h 13d 0/26 upstream: reported C repro on 2024/04/11 09:48
upstream WARNING: locking bug in ext4_xattr_inode_update_ref (2) ext4 syz 1 273d 269d 0/26 auto-obsoleted due to no activity on 2023/09/25 03:27

Sample crash report:
WARNING: CPU: 0 PID: 8234 at kernel/locking/lockdep.c:698 arch_local_save_flags arch/x86/include/asm/paravirt.h:784 [inline]
WARNING: CPU: 0 PID: 8234 at kernel/locking/lockdep.c:698 look_up_lock_class kernel/locking/lockdep.c:689 [inline]
WARNING: CPU: 0 PID: 8234 at kernel/locking/lockdep.c:698 register_lock_class+0x77b/0x11c0 kernel/locking/lockdep.c:749
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 8234 Comm: syz-executor351 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 panic+0x26a/0x50e kernel/panic.c:186
 __warn.cold+0x20/0x5a kernel/panic.c:541
 report_bug+0x262/0x2b0 lib/bug.c:183
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 fixup_bug arch/x86/kernel/traps.c:173 [inline]
 do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:look_up_lock_class kernel/locking/lockdep.c:698 [inline]
RIP: 0010:register_lock_class+0x77b/0x11c0 kernel/locking/lockdep.c:749
Code: 8b 05 c9 63 ec 0b 85 c0 0f 85 17 ff ff ff 48 c7 c6 e0 1b 6a 88 48 c7 c7 40 19 6a 88 e8 c3 29 a8 06 0f 0b e9 fd fe ff ff 0f 0b <0f> 0b e9 b3 fa ff ff 48 8d 70 01 48 69 c0 50 01 00 00 48 89 35 ac
RSP: 0018:ffff8880a1e57190 EFLAGS: 00010083
RAX: dffffc0000000000 RBX: ffff88808ac3fa28 RCX: 0000000000000000
RDX: 1ffff11011587f48 RSI: 0000000000000000 RDI: ffff88808ac3fa40
RBP: 0000000000000000 R08: 0000000000000000 R09: 1ffff110143cae3a
R10: ffffffff8d243760 R11: 0000000000000000 R12: ffffffff8cdb7c60
R13: ffffffff8874b000 R14: 1ffff110143cae3a R15: 0000000000000000
 __lock_acquire+0x17d/0x3ff0 kernel/locking/lockdep.c:3304
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 down_write+0x34/0x90 kernel/locking/rwsem.c:70
 inode_lock include/linux/fs.h:748 [inline]
 ext4_xattr_inode_update_ref+0xfc/0x780 fs/ext4/xattr.c:1028
 ext4_xattr_inode_dec_ref fs/ext4/xattr.c:1097 [inline]
 ext4_xattr_block_set+0x29c/0x2eb0 fs/ext4/xattr.c:2153
 ext4_xattr_set_handle+0xa1f/0x1030 fs/ext4/xattr.c:2415
 ext4_xattr_set+0x135/0x2a0 fs/ext4/xattr.c:2515
 __vfs_setxattr+0x10e/0x170 fs/xattr.c:149
 __vfs_setxattr_noperm+0x11a/0x420 fs/xattr.c:180
 __vfs_setxattr_locked+0x176/0x250 fs/xattr.c:238
 vfs_setxattr+0xe5/0x270 fs/xattr.c:255
 setxattr+0x23d/0x330 fs/xattr.c:520
 path_setxattr+0x170/0x190 fs/xattr.c:539
 __do_sys_setxattr fs/xattr.c:554 [inline]
 __se_sys_setxattr fs/xattr.c:550 [inline]
 __x64_sys_setxattr+0xc0/0x160 fs/xattr.c:550
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f5d2554e009
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5d1d1192f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0000000000000031 RCX: 00007f5d2554e009
RDX: 00000000200005c0 RSI: 0000000020000180 RDI: 00000000200000c0
RBP: 00007f5d255d26d8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000002000 R11: 0000000000000246 R12: 00007f5d255d26d0
R13: 0030656c69662f2e R14: 66763d746d66716a R15: 2f30656c69662f2e
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/21 20:52 linux-4.19.y 3f8a27f9e27b cc0f9968 .config console log report syz C [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 WARNING: locking bug in ext4_xattr_inode_update_ref
2023/01/25 18:10 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report syz [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 WARNING: locking bug in ext4_xattr_inode_update_ref
* Struck through repros no longer work on HEAD.