syzbot


possible deadlock in vm_mmap_pgoff

Status: upstream: reported C repro on 2023/03/20 04:41
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+e500ea0c0c680009b993@syzkaller.appspotmail.com
First crash: 633d, last: 3d08h
Bug presence (3)
Date Name Commit Repro Result
2024/12/09 linux-6.1.y (ToT) e4d90d63d385 C [report] possible deadlock in vm_mmap_pgoff
2023/05/11 upstream (ToT) 80e62bc8487b C [report] possible deadlock in vm_mmap_pgoff
2024/12/09 upstream (ToT) fac04efc5c79 C Didn't crash
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 possible deadlock in vm_mmap_pgoff (2) C error 2 745d 748d 0/1 upstream: reported C repro on 2022/11/25 13:47
linux-4.19 possible deadlock in vm_mmap_pgoff 4 1226d 1348d 0/1 auto-closed as invalid on 2021/12/02 20:13
linux-5.15 possible deadlock in vm_mmap_pgoff origin:upstream missing-backport C error 54 13d 634d 0/3 upstream: reported C repro on 2023/03/19 23:00
upstream possible deadlock in vm_mmap_pgoff reiserfs C inconclusive inconclusive 225 318d 1325d 0/28 auto-obsoleted due to no activity on 2024/04/27 11:44
linux-4.14 possible deadlock in vm_mmap_pgoff reiserfs C 4 673d 740d 0/1 upstream: reported C repro on 2022/12/03 00:54
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2024/11/10 01:06 2h13m bisect fix linux-6.1.y OK (0) job log log
2024/10/07 06:54 3h20m bisect fix linux-6.1.y OK (0) job log log
2024/08/24 21:24 2h20m bisect fix linux-6.1.y OK (0) job log log
2024/06/09 20:54 2h26m bisect fix linux-6.1.y OK (0) job log log
2024/03/05 11:16 2h35m bisect fix linux-6.1.y OK (0) job log log
2023/04/19 04:41 1h00m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
REISERFS (device loop0): Using r5 hash to sort names
REISERFS (device loop0): using 3.5.x disk format
REISERFS warning (device loop0): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2)
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
6.1.75-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor669/9053 is trying to acquire lock:
ffff888020a17090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27

but task is already holding lock:
ffff88801246bd58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
ffff88801246bd58 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x175/0x2d0 mm/util.c:518

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&mm->mmap_lock){++++}-{3:3}:
       lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
       __might_fault+0xbd/0x110 mm/memory.c:5811
       reiserfs_ioctl+0x11d/0x340 fs/reiserfs/ioctl.c:96
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:870 [inline]
       __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
       do_syscall_x64 arch/x86/entry/common.c:51 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&sbi->lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3090 [inline]
       check_prevs_add kernel/locking/lockdep.c:3209 [inline]
       validate_chain+0x1661/0x5950 kernel/locking/lockdep.c:3825
       __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
       lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
       reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
       reiserfs_dirty_inode+0xee/0x240 fs/reiserfs/super.c:704
       __mark_inode_dirty+0x331/0xf80 fs/fs-writeback.c:2433
       generic_update_time fs/inode.c:1903 [inline]
       inode_update_time fs/inode.c:1916 [inline]
       touch_atime+0x3fa/0x680 fs/inode.c:1988
       file_accessed include/linux/fs.h:2579 [inline]
       generic_file_mmap+0xbc/0x120 mm/filemap.c:3518
       call_mmap include/linux/fs.h:2254 [inline]
       mmap_region+0xf96/0x1fa0 mm/mmap.c:2763
       do_mmap+0x8c5/0xf60 mm/mmap.c:1425
       vm_mmap_pgoff+0x1ca/0x2d0 mm/util.c:520
       ksys_mmap_pgoff+0x4f5/0x6d0 mm/mmap.c:1471
       do_syscall_x64 arch/x86/entry/common.c:51 [inline]
       do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

2 locks held by syz-executor669/9053:
 #0: ffff88801246bd58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:87 [inline]
 #0: ffff88801246bd58 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x175/0x2d0 mm/util.c:518
 #1: ffff88801f47a460 (sb_writers#10){.+.+}-{0:0}, at: file_accessed include/linux/fs.h:2579 [inline]
 #1: ffff88801f47a460 (sb_writers#10){.+.+}-{0:0}, at: generic_file_mmap+0xbc/0x120 mm/filemap.c:3518

stack backtrace:
CPU: 0 PID: 9053 Comm: syz-executor669 Not tainted 6.1.75-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 check_noncircular+0x2fa/0x3b0 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3090 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain+0x1661/0x5950 kernel/locking/lockdep.c:3825
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
 reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
 reiserfs_dirty_inode+0xee/0x240 fs/reiserfs/super.c:704
 __mark_inode_dirty+0x331/0xf80 fs/fs-writeback.c:2433
 generic_update_time fs/inode.c:1903 [inline]
 inode_update_time fs/inode.c:1916 [inline]
 touch_atime+0x3fa/0x680 fs/inode.c:1988
 file_accessed include/linux/fs.h:2579 [inline]
 generic_file_mmap+0xbc/0x120 mm/filemap.c:3518
 call_mmap include/linux/fs.h:2254 [inline]
 mmap_region+0xf96/0x1fa0 mm/mmap.c:2763
 do_mmap+0x8c5/0xf60 mm/mmap.c:1425
 vm_mmap_pgoff+0x1ca/0x2d0 mm/util.c:520
 ksys_mmap_pgoff+0x4f5/0x6d0 mm/mmap.c:1471
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6bf698b419
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 1c 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:00007ffe925fa5e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f6bf698b419
RDX: 0000000000000001 RSI: 0000000000003000 RDI: 0000000020000000
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000010012 R11: 0000000000000246 R12: 00007ffe925fa61c
R13: 0000000000000a93 R14: 431bde82d7b634db R15: 00007ffe925fa650
 </TASK>

Crashes (37):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/27 09:49 linux-6.1.y 883d1a956208 cc4a4020 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/05/08 16:07 linux-6.1.y ca48fc16c493 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2024/04/09 12:13 linux-6.1.y 347385861c50 f3234354 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/03/17 18:35 linux-6.1.y d7543167affd d615901c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/03/13 12:12 linux-6.1.y 61adba85cc40 db5b7ff0 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/12/11 05:01 linux-6.1.y 6c6a6c7e211c 28b24332 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/08/14 16:57 linux-6.1.y 1321ab403b38 39990d51 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/06/23 00:02 linux-6.1.y e84a4e368abe 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/06/11 19:27 linux-6.1.y 2f3918bc53fb 49519f06 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/08/21 08:20 linux-6.1.y 6c44e13dc284 d216d8a0 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/08/16 04:24 linux-6.1.y 1321ab403b38 39990d51 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/05/20 08:19 linux-6.1.y fa74641fb6b9 96689200 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/05/14 06:34 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/03/15 19:16 linux-6.1.y 61adba85cc40 d615901c .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/07/08 23:48 linux-6.1.y 61fd484b2cf6 668cb1fa .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/06/01 13:17 linux-6.1.y d2869ace6eeb babc4389 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/03/20 04:41 linux-6.1.y 7eaef76fbc46 7939252e .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/07/16 19:23 linux-6.1.y cac15753b8ce b66b37bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/12/22 23:19 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2023/10/11 03:41 linux-6.1.y 082280fe94a0 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in vm_mmap_pgoff
2024/12/09 12:55 linux-6.1.y e4d90d63d385 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/05/10 03:53 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/05/06 09:05 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/05/05 21:45 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/04/30 13:51 linux-6.1.y dcbc050cb0d3 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/04/22 02:47 linux-6.1.y 6741e066ec76 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/03/14 17:54 linux-6.1.y 61adba85cc40 8d8ee116 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/01/25 20:55 linux-6.1.y 8fd7f4462453 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2024/01/01 15:47 linux-6.1.y a507f147e6f0 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/12/26 05:26 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/12/21 11:16 linux-6.1.y 4aa6747d9352 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/11/28 23:22 linux-6.1.y 6ac30d748bb0 1adfb6f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/11/09 04:10 linux-6.1.y fb2635ac69ab 4862372a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/10/09 00:55 linux-6.1.y ecda77b46871 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/07/25 12:10 linux-6.1.y 5302e81aa209 3b91ad04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/05/13 13:18 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
2023/04/26 12:19 linux-6.1.y f17b0ab65d17 8d843721 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in vm_mmap_pgoff
* Struck through repros no longer work on HEAD.