syzbot


possible deadlock in reiserfs_dirty_inode

Status: upstream: reported on 2022/11/28 10:04
Reported-by: syzbot+c319bb5b1014113a92cf@syzkaller.appspotmail.com
First crash: 69d, last: 13h32m
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 possible deadlock in reiserfs_dirty_inode 1 72d 72d 0/1 upstream: reported on 2022/11/25 09:22

Sample crash report:
REISERFS (device loop4): Using r5 hash to sort names
REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
6.2.0-rc6-syzkaller-00258-gdb27c22251e7 #0 Not tainted
------------------------------------------------------
syz-executor.4/32536 is trying to acquire lock:
ffff888017aea458 (&mm->mmap_lock){++++}-{3:3}, at: __might_fault+0x93/0x120

but task is already holding lock:
ffff888146852090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x7a/0xd0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&sbi->lock){+.+.}-{3:3}:
       lock_acquire+0x20b/0x600
       __mutex_lock_common+0x1c2/0x2630
       mutex_lock_nested+0x1b/0x20
       reiserfs_write_lock+0x7a/0xd0
       reiserfs_dirty_inode+0xe3/0x230
       __mark_inode_dirty+0x3dd/0x1230
       __file_update_time+0x221/0x240
       file_update_time+0x350/0x3c0
       filemap_page_mkwrite+0x25b/0x610
       do_page_mkwrite+0x1a1/0x600
       do_wp_page+0x506/0x3270
       handle_mm_fault+0x2388/0x51c0
       exc_page_fault+0x66a/0x880
       asm_exc_page_fault+0x26/0x30

-> #1 (sb_pagefaults#5){.+.+}-{0:0}:
       lock_acquire+0x20b/0x600
       filemap_page_mkwrite+0x16e/0x610
       do_page_mkwrite+0x1a1/0x600
       do_wp_page+0x506/0x3270
       handle_mm_fault+0x2388/0x51c0
       exc_page_fault+0x66a/0x880
       asm_exc_page_fault+0x26/0x30

-> #0 (&mm->mmap_lock){++++}-{3:3}:
       validate_chain+0x166b/0x5860
       __lock_acquire+0x125b/0x1f80
       lock_acquire+0x20b/0x600
       __might_fault+0xba/0x120
       reiserfs_ioctl+0x121/0x340
       __se_sys_ioctl+0xf1/0x160
       do_syscall_64+0x41/0xc0
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Chain exists of:
  &mm->mmap_lock --> sb_pagefaults#5 --> &sbi->lock

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

1 lock held by syz-executor.4/32536:
 #0: ffff888146852090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x7a/0xd0

stack backtrace:
CPU: 1 PID: 32536 Comm: syz-executor.4 Not tainted 6.2.0-rc6-syzkaller-00258-gdb27c22251e7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 <TASK>
 dump_stack_lvl+0x1b5/0x2a0
 check_noncircular+0x2d1/0x390
 validate_chain+0x166b/0x5860
 __lock_acquire+0x125b/0x1f80
 lock_acquire+0x20b/0x600
 __might_fault+0xba/0x120
 reiserfs_ioctl+0x121/0x340
 __se_sys_ioctl+0xf1/0x160
 do_syscall_64+0x41/0xc0
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0b5528c0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007f0b5605b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f0b553abf80 RCX: 00007f0b5528c0c9
RDX: 0000000020000080 RSI: 0000000080087601 RDI: 0000000000000004
RBP: 00007f0b552e7ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffde8390b5f R14: 00007f0b5605b300 R15: 0000000000022000
 </TASK>

Crashes (78):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-fs 2023/02/04 21:30 upstream db27c22251e7 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/02/04 14:40 upstream 0136d86b7852 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/02/02 01:45 upstream 9f266ccaa2f5 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/30 12:46 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/29 13:33 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/27 23:17 upstream 83abd4d4c4be 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/25 22:59 upstream 948ef7bb70c4 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/24 05:03 upstream 7bf70dbb1882 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/23 22:26 upstream 7bf70dbb1882 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/23 08:45 upstream 2475bf0250de 44388686 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/22 22:29 upstream 2475bf0250de cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/22 05:42 upstream 2241ab53cbb5 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/21 15:39 upstream f883675bf652 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/20 09:05 upstream d368967cb103 dd15ff29 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/19 20:34 upstream 081edded9b38 71197f3a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/19 07:13 upstream 7287904c8771 66fca3ae .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/18 12:25 upstream c1649ec55708 4620c2d9 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/18 03:28 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci-upstream-kasan-gce-root 2023/01/18 02:26 upstream 6e50979a9c87 aedf5331 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/18 01:25 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/17 23:17 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/17 17:06 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/17 09:51 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/16 21:57 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/16 03:20 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/15 14:58 upstream 7c6984405241 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/14 21:38 upstream 97ec4d559d93 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/14 08:02 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/13 15:18 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/13 05:18 upstream c757fc92a3f7 96166539 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/11 18:12 upstream 7dd4b804e080 96166539 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/10 20:28 upstream 5a41237ad1d4 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/09 17:42 upstream 1fe4fd6f5cad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/09 15:13 upstream 1fe4fd6f5cad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/09 04:15 upstream 1fe4fd6f5cad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/08 10:07 upstream 9b43a525db12 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/08 09:46 upstream 9b43a525db12 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/07 13:08 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/06 19:04 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/06 18:57 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/06 18:14 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/05 05:51 upstream 512dee0c00ad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/05 05:01 upstream 512dee0c00ad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/04 03:30 upstream 69b41ac87e4a f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/03 11:04 upstream 69b41ac87e4a f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2023/01/02 04:07 upstream e4cf7c25bae5 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/31 21:12 upstream c8451c141e07 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/30 21:24 upstream bff687b3dad6 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/27 13:41 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/27 13:05 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/27 12:52 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/25 23:09 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/23 05:02 upstream 0a924817d2ed 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/20 17:56 upstream 6feb57c2fd7c d3e76707 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/20 16:35 upstream 6feb57c2fd7c c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/20 08:16 upstream aeba12b26c79 c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/16 20:56 upstream 84e57d292203 05494336 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/16 08:43 upstream 851f657a8642 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci-upstream-kasan-gce-selinux-root 2022/12/15 23:44 upstream 785d21ba2f44 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/13 18:32 upstream 764822972d64 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci-qemu-upstream 2022/12/12 04:16 upstream 830b3c68c1fb 67be1ae7 .config console log report info possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/10 05:51 upstream 0d1409e4ff08 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci-qemu-upstream 2022/12/10 03:37 upstream 3ecc37918c80 67be1ae7 .config console log report info possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/09 02:21 upstream f3e8416619ce 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/08 20:26 upstream 479174d402bc 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/08 04:11 upstream 479174d402bc d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/07 08:18 upstream 8ed710da2873 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/06 17:54 upstream bce9332220bd d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/03 09:16 upstream 97ee9d1c1696 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/03 07:09 upstream 97ee9d1c1696 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/02 14:27 upstream a4412fdd49dc e080de16 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/12/01 06:39 upstream 04aa64375f48 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci2-upstream-fs 2022/11/29 00:24 upstream b7b275e60bcd ca9683b8 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci-upstream-kasan-gce-root 2022/11/27 18:59 upstream faf68e3523c2 74a66371 .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
ci-upstream-linux-next-kasan-gce-root 2022/12/06 19:28 linux-next 9e46a7996732 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] possible deadlock in reiserfs_dirty_inode
* Struck through repros no longer work on HEAD.