syzbot


KCSAN: data-race in __bforget / sync_mapping_buffers (3)

Status: auto-closed as invalid on 2021/10/06 09:21
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 481d, last: 462d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bforget / sync_mapping_buffers (2) 1 632d 632d 0/24 auto-closed as invalid on 2021/04/19 13:07
upstream KCSAN: data-race in __bforget / sync_mapping_buffers 4 793d 836d 0/24 auto-closed as invalid on 2020/11/09 08:03

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __bforget / sync_mapping_buffers

write to 0xffff8881337347a8 of 8 bytes by task 20611 on cpu 1:
 __remove_assoc_queue fs/buffer.c:481 [inline]
 fsync_buffers_list fs/buffer.c:688 [inline]
 sync_mapping_buffers+0x155/0x8b0 fs/buffer.c:548
 ext4_fsync_nojournal fs/ext4/fsync.c:86 [inline]
 ext4_sync_file+0x286/0x670 fs/ext4/fsync.c:170
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2948 [inline]
 ext4_buffered_write_iter+0x3af/0x400 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e7/0x11a0 fs/ext4/file.c:519
 call_write_iter include/linux/fs.h:2157 [inline]
 do_iter_readv_writev+0x2cd/0x370 fs/read_write.c:729
 do_iter_write+0x192/0x5c0 fs/read_write.c:855
 vfs_iter_write+0x4c/0x70 fs/read_write.c:896
 iter_file_splice_write+0x40a/0x750 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+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x618/0xb90 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881337347a8 of 8 bytes by task 25116 on cpu 0:
 __bforget+0x22/0x150 fs/buffer.c:1159
 bforget include/linux/buffer_head.h:297 [inline]
 __ext4_forget+0x67/0x620 fs/ext4/ext4_jbd2.c:266
 ext4_free_blocks+0x704/0x1b50 fs/ext4/mballoc.c:5871
 ext4_ext_try_to_merge_up fs/ext4/extents.c:1834 [inline]
 ext4_ext_try_to_merge+0x2fa/0x310 fs/ext4/extents.c:1861
 ext4_convert_unwritten_extents_endio fs/ext4/extents.c:3728 [inline]
 ext4_ext_handle_unwritten_extents+0x67a/0xaa0 fs/ext4/extents.c:3856
 ext4_ext_map_blocks+0x719/0x1f00 fs/ext4/extents.c:4126
 ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638
 ext4_convert_unwritten_extents+0x15a/0x2c0 fs/ext4/extents.c:4768
 ext4_convert_unwritten_io_end_vec+0xa4/0x130 fs/ext4/extents.c:4807
 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+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

value changed: 0xffff888154c1c3c0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 25116 Comm: kworker/u4:4 Tainted: G        W         5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/01 09:20 upstream b91db6a0b52e 7eb7e152 .config log report info KCSAN: data-race in __bforget / sync_mapping_buffers
ci2-upstream-kcsan-gce 2021/08/13 14:20 upstream f8e6dfc64f61 3fd2ea69 .config log report info KCSAN: data-race in __bforget / sync_mapping_buffers
* Struck through repros no longer work on HEAD.