syzbot


KCSAN: data-race in ext4_ext_handle_unwritten_extents / ext4_fill_raw_inode

Status: auto-closed as invalid on 2022/01/19 20:27
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 357d, last: 357d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_ext_handle_unwritten_extents / ext4_fill_raw_inode

write to 0xffff888130c7060c of 2 bytes by task 43 on cpu 0:
 ext4_ext_mark_initialized fs/ext4/ext4_extents.h:219 [inline]
 ext4_convert_unwritten_extents_endio fs/ext4/extents.c:3763 [inline]
 ext4_ext_handle_unwritten_extents+0x673/0xb60 fs/ext4/extents.c:3896
 ext4_ext_map_blocks+0x76a/0x2120 fs/ext4/extents.c:4166
 ext4_map_blocks+0x71e/0xf00 fs/ext4/inode.c:637
 ext4_convert_unwritten_extents+0x17a/0x2d0 fs/ext4/extents.c:4808
 ext4_convert_unwritten_io_end_vec+0xa4/0x130 fs/ext4/extents.c:4847
 ext4_end_io_end fs/ext4/page-io.c:184 [inline]
 ext4_do_flush_completed_IO fs/ext4/page-io.c:257 [inline]
 ext4_end_io_rsv_work+0x198/0x360 fs/ext4/page-io.c:271
 process_one_work+0x3fc/0x980 kernel/workqueue.c:2298
 worker_thread+0x616/0xa70 kernel/workqueue.c:2445
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

read to 0xffff888130c7060c of 4 bytes by task 2095 on cpu 1:
 ext4_fill_raw_inode+0x9d3/0xea0 fs/ext4/inode.c:4353
 ext4_do_update_inode fs/ext4/inode.c:5094 [inline]
 ext4_mark_iloc_dirty+0x364/0x890 fs/ext4/inode.c:5694
 __ext4_mark_inode_dirty+0x4ec/0x5f0 fs/ext4/inode.c:5890
 ext4_dirty_inode+0x86/0xa0 fs/ext4/inode.c:5919
 __mark_inode_dirty+0x72/0x6c0 fs/fs-writeback.c:2399
 mark_inode_dirty include/linux/fs.h:2451 [inline]
 generic_write_end+0x157/0x180 fs/buffer.c:2202
 ext4_da_write_end+0x4de/0x630 fs/ext4/inode.c:3059
 generic_perform_write+0x261/0x400 mm/filemap.c:3765
 ext4_buffered_write_iter+0x25b/0x380 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x1200
 call_write_iter include/linux/fs.h:2162 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:725
 do_iter_write+0x192/0x5c0 fs/read_write.c:851
 vfs_iter_write+0x4c/0x70 fs/read_write.c:892
 iter_file_splice_write+0x43a/0x790 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x675/0xc40 fs/read_write.c:1245
 __do_sys_sendfile64 fs/read_write.c:1310 [inline]
 __se_sys_sendfile64 fs/read_write.c:1296 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00008140 -> 0x00008645

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2095 Comm: syz-executor.1 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
syz-executor.1 (2095) used greatest stack depth: 10736 bytes left

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/15 20:21 upstream 2b14864acbaa 572bcb40 .config log report info KCSAN: data-race in ext4_ext_handle_unwritten_extents / ext4_fill_raw_inode
* Struck through repros no longer work on HEAD.