syzbot


possible deadlock in reiserfs_dirty_inode

Status: upstream: reported C repro on 2023/03/19 20:48
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+528a11e64c2564c0d8f0@syzkaller.appspotmail.com
First crash: 567d, last: 14h13m
Bug presence (1)
Date Name Commit Repro Result
2023/07/03 upstream (ToT) 56cbceab928d C [report] UBSAN: array-index-out-of-bounds in do_journal_end
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in reiserfs_dirty_inode origin:upstream C error 44 64d 549d 0/3 upstream: reported C repro on 2023/04/06 01:23
linux-4.19 possible deadlock in reiserfs_dirty_inode reiserfs 2 600d 681d 0/1 upstream: reported on 2022/11/25 09:22
upstream possible deadlock in reiserfs_dirty_inode reiserfs C done done 519 250d 678d 25/28 fixed on 2024/03/20 11:33
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/06/14 14:52 2h17m (3) bisect fix linux-5.15.y OK (0) job log log
2024/03/16 02:46 1h58m bisect fix linux-5.15.y OK (0) job log log
2024/01/24 19:22 2h06m bisect fix linux-5.15.y OK (0) job log log
2023/12/25 07:28 2h07m bisect fix linux-5.15.y OK (0) job log log
2023/09/18 15:29 2h03m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
5.15.119-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor127/7609 is trying to acquire lock:
ffff888023b6ab28 (&mm->mmap_lock#2){++++}-{3:3}, at: __might_fault+0x91/0x110 mm/memory.c:5310

but task is already holding lock:
ffff88801b715090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&sbi->lock){+.+.}-{3:3}:
       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
       __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
       reiserfs_dirty_inode+0xee/0x240 fs/reiserfs/super.c:704
       __mark_inode_dirty+0x2fd/0xd60 fs/fs-writeback.c:2442
       generic_update_time fs/inode.c:1775 [inline]
       inode_update_time fs/inode.c:1788 [inline]
       touch_atime+0x3fa/0x680 fs/inode.c:1860
       file_accessed include/linux/fs.h:2447 [inline]
       generic_file_mmap+0xbf/0x120 mm/filemap.c:3392
       call_mmap include/linux/fs.h:2108 [inline]
       mmap_region+0x10e7/0x1670 mm/mmap.c:1791
       do_mmap+0x78d/0xe00 mm/mmap.c:1575
       vm_mmap_pgoff+0x1ca/0x2d0 mm/util.c:551
       ksys_mmap_pgoff+0x559/0x780 mm/mmap.c:1624
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x61/0xcb

-> #0 (&mm->mmap_lock#2){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain+0x1646/0x58b0 kernel/locking/lockdep.c:3787
       __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
       lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
       __might_fault+0xb4/0x110 mm/memory.c:5311
       reiserfs_ioctl+0x11d/0x340 fs/reiserfs/ioctl.c:96
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x61/0xcb

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(
&sbi->lock);
                               lock(&mm->mmap_lock#2);
                               lock(&sbi->lock);
  lock(&mm->mmap_lock#2);

 *** DEADLOCK ***

1 lock held by syz-executor127/7609:
 #0: 
ffff88801b715090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27

stack backtrace:
CPU: 1 PID: 7609 Comm: syz-executor127 Not tainted 5.15.119-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain+0x1646/0x58b0 kernel/locking/lockdep.c:3787
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
 __might_fault+0xb4/0x110 mm/memory.c:5311
 reiserfs_ioctl+0x11d/0x340 fs/reiserfs/ioctl.c:96
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f75d4de39f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 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:00007f75ccd6e2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f75d4e697b0 RCX: 00007f75d4de39f9
RDX: 0000000000000000 RSI: 0000000080087601 RDI: 0000000000000007
RBP: 00007f75d4e361f8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 7366726573696572 R14: 632e79726f6d656d R15: 00007f75d4e697b8
 </TASK>

Crashes (42):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/03 13:46 linux-5.15.y 4af60700a60c bfc47836 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/05/13 02:34 linux-5.15.y 284087d4f7d5 9026e142 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/08/25 21:22 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/08/08 02:17 linux-5.15.y 7e89efd3ae1c de12cf65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/07/28 19:15 linux-5.15.y 7e89efd3ae1c 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/07/23 16:37 linux-5.15.y 7c6d66f0266f e50e8da5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/07/18 13:31 linux-5.15.y 7c6d66f0266f 71884c12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/06/20 13:55 linux-5.15.y 4878aadf2d15 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/06/19 09:00 linux-5.15.y 4878aadf2d15 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/05/06 13:53 linux-5.15.y 284087d4f7d5 d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/05/05 18:52 linux-5.15.y 284087d4f7d5 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/04/30 13:48 linux-5.15.y b925f60c6ee7 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/04/25 23:32 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/04/25 23:32 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/04/25 23:32 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/04/15 16:28 linux-5.15.y fa3df276cd36 b9af7e61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/04/02 01:48 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2023/11/14 00:40 linux-5.15.y 80529b4968a8 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2023/11/01 09:54 linux-5.15.y 12952a23a5da 69904c9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2024/10/06 10:01 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/09/08 13:11 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/07/23 13:59 linux-5.15.y 7c6d66f0266f e50e8da5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/07/22 16:54 linux-5.15.y 7c6d66f0266f df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/07/22 14:37 linux-5.15.y 7c6d66f0266f df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/07/22 11:30 linux-5.15.y 7c6d66f0266f df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/07/01 11:23 linux-5.15.y 4878aadf2d15 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/05/15 12:09 linux-5.15.y 284087d4f7d5 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/05/13 23:57 linux-5.15.y 284087d4f7d5 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/05/12 12:44 linux-5.15.y 284087d4f7d5 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/05/10 05:10 linux-5.15.y 284087d4f7d5 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/04/25 16:48 linux-5.15.y c52b9710c83d 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/02/11 02:05 linux-5.15.y 6139f2a02fe0 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2024/01/29 15:36 linux-5.15.y 6139f2a02fe0 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/11/23 21:39 linux-5.15.y 2a910f4af54d 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/11/23 20:37 linux-5.15.y 2a910f4af54d 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/11/20 16:59 linux-5.15.y 2a910f4af54d cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/11/19 00:43 linux-5.15.y 80529b4968a8 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/10/09 18:26 linux-5.15.y 1edcec18cfb7 3c53c7d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/03/29 21:14 linux-5.15.y 115472395b0a f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in reiserfs_dirty_inode
2023/04/23 09:36 linux-5.15.y 3299fb36854f 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/03/28 17:47 linux-5.15.y 115472395b0a fc067f05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
2023/03/19 20:48 linux-5.15.y 8020ae3c051d 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in reiserfs_dirty_inode
* Struck through repros no longer work on HEAD.