syzbot


KCSAN: data-race in __ext4_handle_dirty_metadata / jbd2_journal_update_sb_log_tail

Status: auto-closed as invalid on 2021/03/13 20:27
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 726d, last: 726d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __ext4_handle_dirty_metadata / jbd2_journal_update_sb_log_tail (2) 6 417d 473d 0/24 auto-closed as invalid on 2022/01/16 21:04
upstream KCSAN: data-race in __ext4_handle_dirty_metadata / jbd2_journal_update_sb_log_tail (3) 2 268d 270d 0/24 closed as invalid on 2022/05/13 11:20

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __ext4_handle_dirty_metadata / jbd2_journal_update_sb_log_tail

write to 0xffff888102eb5800 of 8 bytes by task 4853 on cpu 1:
 jbd2_journal_update_sb_log_tail+0x134/0x170 syzkaller/managers/upstream-kcsan-gce/kernel/fs/jbd2/journal.c:1637
 __jbd2_update_log_tail+0x41/0x1f0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/jbd2/journal.c:1115
 jbd2_update_log_tail+0x5d/0x80 syzkaller/managers/upstream-kcsan-gce/kernel/fs/jbd2/journal.c:1149
 jbd2_journal_commit_transaction+0x2168/0x32b0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/jbd2/commit.c:950
 kjournald2+0x263/0x480 syzkaller/managers/upstream-kcsan-gce/kernel/fs/jbd2/journal.c:213
 kthread+0x20b/0x230 syzkaller/managers/upstream-kcsan-gce/kernel/kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 syzkaller/managers/upstream-kcsan-gce/kernel/arch/x86/entry/entry_64.S:296

read to 0xffff888102eb5800 of 8 bytes by task 24793 on cpu 0:
 is_journal_aborted syzkaller/managers/upstream-kcsan-gce/kernel/./include/linux/jbd2.h:1647 [inline]
 is_handle_aborted syzkaller/managers/upstream-kcsan-gce/kernel/./include/linux/jbd2.h:1654 [inline]
 __ext4_handle_dirty_metadata+0x118/0x5a0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/ext4_jbd2.c:333
 ext4_do_update_inode syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/inode.c:5144 [inline]
 ext4_mark_iloc_dirty+0x12f2/0x16f0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/inode.c:5725
 __ext4_mark_inode_dirty+0x4d6/0x5e0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/inode.c:5919
 ext4_da_write_end+0x4c7/0x760 syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/inode.c:3101
 generic_perform_write+0x23e/0x3a0 syzkaller/managers/upstream-kcsan-gce/kernel/mm/filemap.c:3423
 ext4_buffered_write_iter+0x2e5/0x3e0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/file.c:270
 ext4_file_write_iter+0x47a/0x1060 syzkaller/managers/upstream-kcsan-gce/kernel/fs/ext4/file.c:503
 call_write_iter syzkaller/managers/upstream-kcsan-gce/kernel/./include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:740
 do_iter_write+0x112/0x4c0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:907
 iter_file_splice_write+0x41a/0x770 syzkaller/managers/upstream-kcsan-gce/kernel/fs/splice.c:686
 do_splice_from syzkaller/managers/upstream-kcsan-gce/kernel/fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 syzkaller/managers/upstream-kcsan-gce/kernel/fs/splice.c:888
 do_splice_direct+0xf5/0x170 syzkaller/managers/upstream-kcsan-gce/kernel/fs/splice.c:976
 do_sendfile+0x5e0/0xcf0 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:1257
 __do_sys_sendfile64 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 syzkaller/managers/upstream-kcsan-gce/kernel/fs/read_write.c:1304
 do_syscall_64+0x39/0x80 syzkaller/managers/upstream-kcsan-gce/kernel/arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24793 Comm: syz-executor.2 Not tainted 5.11.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2021/02/06 20:19 upstream 1e0d27fce010 0655e081 .config console log report info KCSAN: data-race in __ext4_handle_dirty_metadata / jbd2_journal_update_sb_log_tail
* Struck through repros no longer work on HEAD.