syzbot


KCSAN: data-race in __inode_add_bytes / ext4_mark_iloc_dirty

Status: closed as invalid on 2019/11/19 14:04
Subsystems: ext4
[Documentation on labels]
First crash: 1624d, last: 1624d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __inode_add_bytes / ext4_mark_iloc_dirty (2) fs 1 1490d 1490d 0/26 auto-closed as invalid on 2020/05/30 16:54

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __inode_add_bytes / ext4_mark_iloc_dirty

read to 0xffff8881259ca178 of 8 bytes by task 25135 on cpu 0:
 ext4_inode_blocks_set fs/ext4/inode.c:5110 [inline]
 ext4_do_update_inode fs/ext4/inode.c:5269 [inline]
 ext4_mark_iloc_dirty+0x656/0x1580 fs/ext4/inode.c:5876
 ext4_mark_inode_dirty+0xe9/0x420 fs/ext4/inode.c:6055
 ext4_dirty_inode+0x86/0xb0 fs/ext4/inode.c:6086
 __mark_inode_dirty+0x5d4/0x940 fs/fs-writeback.c:2255
 mark_inode_dirty include/linux/fs.h:2165 [inline]
 generic_write_end+0x1b7/0x1f0 fs/buffer.c:2159
 ext4_da_write_end+0x158/0x620 fs/ext4/inode.c:3189
 generic_perform_write+0x1d3/0x320 mm/filemap.c:3316
 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3434
 ext4_file_write_iter+0x1bd/0xa00 fs/ext4/file.c:268
 call_write_iter include/linux/fs.h:1895 [inline]
 new_sync_write+0x388/0x4a0 fs/read_write.c:483
 __vfs_write+0xb1/0xc0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0xd5/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8881259ca178 of 8 bytes by task 8238 on cpu 1:
 __inode_add_bytes+0x56/0xe0 fs/stat.c:679
 dquot_claim_space_nodirty+0x311/0x360 fs/quota/dquot.c:1772
 dquot_claim_block include/linux/quotaops.h:353 [inline]
 ext4_da_update_reserve_space+0x14d/0x3a0 fs/ext4/inode.c:378
 ext4_ext_map_blocks+0x1e57/0x2330 fs/ext4/extents.c:4520
 ext4_map_blocks+0x23a/0xfa0 fs/ext4/inode.c:640
 mpage_map_one_extent fs/ext4/inode.c:2468 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2517 [inline]
 ext4_writepages+0x136e/0x2300 fs/ext4/inode.c:2869
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __writeback_single_inode+0xaf/0x8e0 fs/fs-writeback.c:1449
 writeback_sb_inodes+0x4ba/0xa50 fs/fs-writeback.c:1713
 __writeback_inodes_wb+0xe8/0x1b0 fs/fs-writeback.c:1782
 wb_writeback+0x557/0x6a0 fs/fs-writeback.c:1891
 wb_check_background_flush fs/fs-writeback.c:1959 [inline]
 wb_do_writeback fs/fs-writeback.c:2047 [inline]
 wb_workfn+0x696/0x970 fs/fs-writeback.c:2075
 process_one_work+0x3d4/0x890 kernel/workqueue.c:2269
 worker_thread+0xa0/0x800 kernel/workqueue.c:2415
 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8238 Comm: kworker/u4:5 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: writeback wb_workfn (flush-8:0)
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/08 11:09 https://github.com/google/ktsan.git kcsan 94c006602e13 1e35461e .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.