syzbot


KCSAN: data-race in __mark_inode_dirty / move_expired_inodes (3)

Status: auto-obsoleted due to no activity on 2024/11/22 12:08
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+85bae17702fc7d1b6960@syzkaller.appspotmail.com
First crash: 39d, last: 39d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mark_inode_dirty / move_expired_inodes (4) ext4 1 23h10m 23h10m 0/28 moderation: reported on 2024/11/26 02:46
upstream KCSAN: data-race in __mark_inode_dirty / move_expired_inodes ext4 75 1197d 1450d 0/28 auto-closed as invalid on 2021/09/21 21:54
upstream KCSAN: data-race in __mark_inode_dirty / move_expired_inodes (2) ext4 195 80d 355d 0/28 auto-obsoleted due to no activity on 2024/10/12 23:36

Sample crash report:
loop1: detected capacity change from 0 to 512
ext4 filesystem being mounted at /111/file0 supports timestamps until 2038-01-19 (0x7fffffff)
==================================================================
BUG: KCSAN: data-race in __mark_inode_dirty / move_expired_inodes

read-write to 0xffff888104e265b8 of 4 bytes by task 28 on cpu 1:
 move_expired_inodes+0x17a/0x410 fs/fs-writeback.c:1435
 queue_io+0xe1/0x2e0 fs/fs-writeback.c:1487
 wb_writeback+0x237/0x640 fs/fs-writeback.c:2130
 wb_do_writeback fs/fs-writeback.c:2281 [inline]
 wb_workfn+0x1a8/0x940 fs/fs-writeback.c:2321
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888104e265b8 of 4 bytes by task 10343 on cpu 0:
 __mark_inode_dirty+0x198/0x7e0 fs/fs-writeback.c:2515
 mark_inode_dirty include/linux/fs.h:2474 [inline]
 dquot_alloc_space include/linux/quotaops.h:319 [inline]
 dquot_alloc_block include/linux/quotaops.h:336 [inline]
 ext4_mb_new_blocks+0x103e/0x2020 fs/ext4/mballoc.c:6183
 ext4_ext_map_blocks+0x1008/0x35c0 fs/ext4/extents.c:4379
 ext4_map_create_blocks fs/ext4/inode.c:516 [inline]
 ext4_map_blocks+0x592/0xcf0 fs/ext4/inode.c:702
 _ext4_get_block+0x104/0x370 fs/ext4/inode.c:781
 ext4_get_block_unwritten+0x2c/0xb0 fs/ext4/inode.c:814
 ext4_block_write_begin+0x34f/0x9c0 fs/ext4/inode.c:1056
 ext4_write_begin+0x426/0xc30
 ext4_da_write_begin+0x1b6/0x540 fs/ext4/inode.c:2914
 generic_perform_write+0x1a8/0x4a0 mm/filemap.c:4054
 ext4_buffered_write_iter+0x1ea/0x370 fs/ext4/file.c:299
 ext4_file_write_iter+0x293/0xe10
 new_sync_write fs/read_write.c:590 [inline]
 vfs_write+0x76a/0x910 fs/read_write.c:683
 ksys_write+0xeb/0x1b0 fs/read_write.c:736
 __do_sys_write fs/read_write.c:748 [inline]
 __se_sys_write fs/read_write.c:745 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:745
 x64_sys_call+0x27dd/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000038 -> 0x0001003a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 10343 Comm: syz.1.1339 Not tainted 6.12.0-rc3-syzkaller-00217-g4d939780b705 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
syz.1.1339 (10343) used greatest stack depth: 10232 bytes left

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/18 12:07 upstream 4d939780b705 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / move_expired_inodes
* Struck through repros no longer work on HEAD.