syzbot


possible deadlock in ntfs_read_block

Status: auto-obsoleted due to no activity on 2024/02/20 16:15
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+780dbcbee0942e16bcb6@syzkaller.appspotmail.com
First crash: 570d, last: 441d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] possible deadlock in ntfs_read_block 0 (1) 2022/09/30 22:27
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/02/20 15:54 20m retest repro upstream OK log
2024/02/20 14:53 17m retest repro upstream OK log
2024/02/20 01:29 52m retest repro upstream OK log
2024/02/19 16:38 25m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/19 15:10 19m retest repro upstream OK log
2024/02/18 23:43 25m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/18 23:43 24m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/18 23:43 1h31m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/18 23:43 1h31m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/02/18 23:43 41m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.1.0-rc7-syzkaller-00123-ga4412fdd49dc #0 Not tainted
------------------------------------------------------
kworker/u4:0/9 is trying to acquire lock:
ffff8880700e0940 (&rl->lock){++++}-{3:3}, at: ntfs_read_block+0x91a/0x22e0 fs/ntfs/aops.c:248

but task is already holding lock:
ffff8880700e3310 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x46/0x610 fs/ntfs/mft.c:154

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&ni->mrec_lock){+.+.}-{3:3}:
       lock_acquire+0x182/0x3c0 kernel/locking/lockdep.c:5668
       __mutex_lock_common+0x1bd/0x26e0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
       map_mft_record+0x46/0x610 fs/ntfs/mft.c:154
       ntfs_truncate+0x24e/0x2720 fs/ntfs/inode.c:2383
       ntfs_truncate_vfs fs/ntfs/inode.c:2862 [inline]
       ntfs_setattr+0x2b9/0x3a0 fs/ntfs/inode.c:2914
       notify_change+0xe38/0x10f0 fs/attr.c:420
       do_truncate+0x1fb/0x2e0 fs/open.c:65
       handle_truncate fs/namei.c:3216 [inline]
       do_open fs/namei.c:3561 [inline]
       path_openat+0x2770/0x2df0 fs/namei.c:3714
       do_filp_open+0x264/0x4f0 fs/namei.c:3741
       do_sys_openat2+0x124/0x4e0 fs/open.c:1310
       do_sys_open fs/open.c:1326 [inline]
       __do_sys_creat fs/open.c:1402 [inline]
       __se_sys_creat fs/open.c:1396 [inline]
       __x64_sys_creat+0x11f/0x160 fs/open.c:1396
       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+0x63/0xcd

-> #0 (&rl->lock){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3097 [inline]
       check_prevs_add kernel/locking/lockdep.c:3216 [inline]
       validate_chain+0x1898/0x6ae0 kernel/locking/lockdep.c:3831
       __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055
       lock_acquire+0x182/0x3c0 kernel/locking/lockdep.c:5668
       down_read+0x39/0x50 kernel/locking/rwsem.c:1509
       ntfs_read_block+0x91a/0x22e0 fs/ntfs/aops.c:248
       filemap_read_folio+0x187/0x7d0 mm/filemap.c:2407
       do_read_cache_folio+0x2d3/0x790 mm/filemap.c:3534
       do_read_cache_page mm/filemap.c:3576 [inline]
       read_cache_page+0x56/0x270 mm/filemap.c:3585
       read_mapping_page include/linux/pagemap.h:756 [inline]
       ntfs_map_page fs/ntfs/aops.h:75 [inline]
       ntfs_sync_mft_mirror+0x21a/0x1df0 fs/ntfs/mft.c:480
       write_mft_record_nolock+0x1213/0x1930 fs/ntfs/mft.c:787
       write_mft_record fs/ntfs/mft.h:95 [inline]
       __ntfs_write_inode+0x721/0xc90 fs/ntfs/inode.c:3050
       write_inode fs/fs-writeback.c:1440 [inline]
       __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1652
       writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1878
       wb_writeback+0x41f/0x7b0 fs/fs-writeback.c:2052
       wb_do_writeback fs/fs-writeback.c:2195 [inline]
       wb_workfn+0x3cb/0xef0 fs/fs-writeback.c:2235
       process_one_work+0x877/0xdb0 kernel/workqueue.c:2289
       worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
       kthread+0x266/0x300 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&ni->mrec_lock);
                               lock(&rl->lock);
                               lock(&ni->mrec_lock);
  lock(&rl->lock);

 *** DEADLOCK ***

3 locks held by kworker/u4:0/9:
 #0: ffff8881459c6138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7f2/0xdb0
 #1: ffffc900000e7d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x831/0xdb0 kernel/workqueue.c:2264
 #2: ffff8880700e3310 (&ni->mrec_lock){+.+.}-{3:3}, at: map_mft_record+0x46/0x610 fs/ntfs/mft.c:154

stack backtrace:
CPU: 0 PID: 9 Comm: kworker/u4:0 Not tainted 6.1.0-rc7-syzkaller-00123-ga4412fdd49dc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
 check_noncircular+0x2cc/0x390 kernel/locking/lockdep.c:2177
 check_prev_add kernel/locking/lockdep.c:3097 [inline]
 check_prevs_add kernel/locking/lockdep.c:3216 [inline]
 validate_chain+0x1898/0x6ae0 kernel/locking/lockdep.c:3831
 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055
 lock_acquire+0x182/0x3c0 kernel/locking/lockdep.c:5668
 down_read+0x39/0x50 kernel/locking/rwsem.c:1509
 ntfs_read_block+0x91a/0x22e0 fs/ntfs/aops.c:248
 filemap_read_folio+0x187/0x7d0 mm/filemap.c:2407
 do_read_cache_folio+0x2d3/0x790 mm/filemap.c:3534
 do_read_cache_page mm/filemap.c:3576 [inline]
 read_cache_page+0x56/0x270 mm/filemap.c:3585
 read_mapping_page include/linux/pagemap.h:756 [inline]
 ntfs_map_page fs/ntfs/aops.h:75 [inline]
 ntfs_sync_mft_mirror+0x21a/0x1df0 fs/ntfs/mft.c:480
 write_mft_record_nolock+0x1213/0x1930 fs/ntfs/mft.c:787
 write_mft_record fs/ntfs/mft.h:95 [inline]
 __ntfs_write_inode+0x721/0xc90 fs/ntfs/inode.c:3050
 write_inode fs/fs-writeback.c:1440 [inline]
 __writeback_single_inode+0x4d6/0x670 fs/fs-writeback.c:1652
 writeback_sb_inodes+0xb3b/0x18f0 fs/fs-writeback.c:1878
 wb_writeback+0x41f/0x7b0 fs/fs-writeback.c:2052
 wb_do_writeback fs/fs-writeback.c:2195 [inline]
 wb_workfn+0x3cb/0xef0 fs/fs-writeback.c:2235
 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (112):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/02 20:50 upstream a4412fdd49dc e080de16 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/12/02 06:53 upstream ef4d3ea40565 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/11/24 14:06 upstream 4312098baf37 ff68ff8f .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/10/01 12:43 upstream 70575e77839f feb56351 .config strace log report syz C [disk image] [vmlinux] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/04 12:33 upstream 69b41ac87e4a 1dac8c7a .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/12/17 05:33 upstream 84e57d292203 05494336 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/12/12 04:03 upstream 4cee37b3a4e6 67be1ae7 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/12/09 10:33 upstream f3e8416619ce 1034e5fa .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/04 15:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2022/12/17 07:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 05494336 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2022/12/12 06:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 67be1ae7 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2022/12/09 20:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 67be1ae7 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2022/12/02 10:27 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci cdb931b58ff5 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2022/09/30 20:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config console log report syz C [disk image] [vmlinux] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2023/02/03 11:08 upstream 66a87fff1a87 16d19e30 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in ntfs_read_block
2023/02/03 00:50 upstream e7368fd30165 16d19e30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/02/02 08:41 upstream 9f266ccaa2f5 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/02/02 02:30 upstream 9f266ccaa2f5 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/02/01 22:17 upstream c0b67534c95c 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/02/01 17:26 upstream c0b67534c95c 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/02/01 13:59 upstream c0b67534c95c 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in ntfs_read_block
2023/01/30 19:22 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/30 18:21 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/30 05:30 upstream ab072681eabe 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/29 10:20 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in ntfs_read_block
2023/01/29 04:07 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/28 15:40 upstream 5af6ce704936 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/28 11:52 upstream 5af6ce704936 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/26 03:23 upstream 7c46948a6e9c 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/25 11:51 upstream 948ef7bb70c4 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/25 10:12 upstream fb6e71db53f3 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/23 11:47 upstream 2475bf0250de 44388686 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/23 05:51 upstream 2475bf0250de cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/19 22:59 upstream 081edded9b38 1b826a2f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in ntfs_read_block
2023/01/18 21:36 upstream c1649ec55708 4620c2d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/18 03:29 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/17 15:24 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/17 11:07 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/17 07:18 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/16 19:47 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/16 07:14 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in ntfs_read_block
2023/01/15 07:46 upstream 7c6984405241 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/14 18:52 upstream 97ec4d559d93 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/14 01:22 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/13 15:20 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/13 05:08 upstream c757fc92a3f7 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/11 02:31 upstream 40c18f363a08 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/10 08:37 upstream 5a41237ad1d4 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/05 21:50 upstream 41c03ba9beea 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/05 05:11 upstream 512dee0c00ad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in ntfs_read_block
2023/01/02 13:58 upstream 88603b6dc419 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/02 02:10 upstream e4cf7c25bae5 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/01/01 13:14 upstream e4cf7c25bae5 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/12/30 00:22 upstream 2258c2dc850b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2022/12/29 17:40 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ntfs_read_block
2023/02/06 20:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ca72d58361ee 0a9c11b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2023/01/17 12:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2023/01/16 03:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9598c377d828 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2023/01/11 15:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 358a161a6a9e 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
2022/09/30 20:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config console log report info [disk image] [vmlinux] ci-upstream-gce-arm64 possible deadlock in ntfs_read_block
* Struck through repros no longer work on HEAD.