syzbot


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

Status: moderation: reported on 2024/10/03 01:57
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+ca4c8e8defb77349c38a@syzkaller.appspotmail.com
First crash: 49d, last: 9d01h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode ext4 43 1638d 1846d 0/28 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode (2) ext4 631 102d 1498d 0/28 auto-obsoleted due to no activity on 2024/09/12 12:13

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode

read-write to 0xffff8881062141b8 of 4 bytes by task 3421 on cpu 0:
 __writeback_single_inode+0x1f4/0x850 fs/fs-writeback.c:1694
 writeback_sb_inodes+0x461/0xa30 fs/fs-writeback.c:1954
 wb_writeback+0x262/0x640 fs/fs-writeback.c:2134
 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 0xffff8881062141b8 of 4 bytes by task 3304 on cpu 1:
 __mark_inode_dirty+0x198/0x7e0 fs/fs-writeback.c:2515
 mark_buffer_dirty+0x165/0x250 fs/buffer.c:1205
 __block_commit_write fs/buffer.c:2194 [inline]
 block_page_mkwrite+0x29c/0x3f0 fs/buffer.c:2638
 ext4_page_mkwrite+0x73d/0xb70 fs/ext4/inode.c:6123
 do_page_mkwrite mm/memory.c:3162 [inline]
 wp_page_shared mm/memory.c:3563 [inline]
 do_wp_page+0xca4/0x2340 mm/memory.c:3713
 handle_pte_fault mm/memory.c:5782 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0xc47/0x2aa0 mm/memory.c:6077
 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x3b9/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x0001002a -> 0x00000020

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3304 Comm: syz-executor Not tainted 6.12.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/12 05:03 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode
2024/11/04 09:56 upstream 59b723cd2adb f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode
2024/10/04 22:48 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode
2024/10/03 01:56 upstream f23aa4c0761a 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / __writeback_single_inode
* Struck through repros no longer work on HEAD.