syzbot


WARNING in lock_two_nondirectories

Status: fixed on 2024/02/16 19:40
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+2c4a3b922a860084cc7f@syzkaller.appspotmail.com
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 162d, last: 147d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING: bad unlock balance in unlock_two_nondirectories (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [ext4?] WARNING in lock_two_nondirectories 2 (5) 2024/02/12 13:28
[PATCH] ext4: fix WARNING in lock_two_nondirectories 10 (10) 2023/12/25 02:56
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/12/26 04:34 14m retest repro upstream report log
2023/12/24 09:14 21m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a39b6ac3781d OK log

Sample crash report:
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none.
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5067 at fs/inode.c:1148 lock_two_nondirectories+0xca/0x100 fs/inode.c:1148
Modules linked in:
CPU: 1 PID: 5067 Comm: syz-executor207 Not tainted 6.7.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:lock_two_nondirectories+0xca/0x100 fs/inode.c:1148
Code: ff 66 41 81 fc 00 40 74 1b e8 c2 3d 92 ff 48 89 ee 48 89 df 5b 5d b9 04 00 00 00 31 d2 41 5c e9 5c fd ff ff e8 a7 3d 92 ff 90 <0f> 0b 90 eb da e8 9c 3d 92 ff 90 0f 0b 90 eb 83 48 89 df e8 5e e4
RSP: 0018:ffffc90003a4fc38 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88807cf82ab0 RCX: ffffffff81f55031
RDX: ffff888078b21dc0 RSI: ffffffff81f55059 RDI: 0000000000000003
RBP: ffff88807cfe66b0 R08: 0000000000000003 R09: 0000000000004000
R10: 0000000000004000 R11: ffffffff915fc8a0 R12: 0000000000004000
R13: ffff8880298d2c80 R14: ffff88807cfe66b0 R15: ffffffff8d195740
FS:  0000555555d51380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000056e5a000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 swap_inode_boot_loader fs/ext4/ioctl.c:391 [inline]
 __ext4_ioctl+0x118d/0x4570 fs/ext4/ioctl.c:1437
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f61c40c4af9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 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:00007ffe0eaa3fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe0eaa4198 RCX: 00007f61c40c4af9
RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000004
RBP: 00007f61c4138610 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe0eaa4188 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/11 14:00 upstream a39b6ac3781d 28b24332 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root WARNING in lock_two_nondirectories
2023/12/11 13:39 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in lock_two_nondirectories
2023/12/12 02:18 upstream 26aff849438c 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in lock_two_nondirectories
* Struck through repros no longer work on HEAD.