syzbot


KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (14)

Status: moderation: reported on 2023/12/10 00:03
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+956afd0db40b79dae18d@syzkaller.appspotmail.com
First crash: 207d, last: 4d12h
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (5) ext4 1 810d 810d 0/26 auto-closed as invalid on 2022/01/16 16:04
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (11) ext4 3 421d 464d 0/26 auto-obsoleted due to no activity on 2023/02/11 11:55
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes ext4 38 1362d 1583d 0/26 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (3) ext4 2 923d 925d 0/26 auto-closed as invalid on 2021/09/25 11:37
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (7) ext4 2 652d 684d 0/26 auto-closed as invalid on 2022/06/23 15:49
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (2) ext4 70 989d 1215d 0/26 auto-closed as invalid on 2021/07/20 20:13
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (13) fs 1 260d 260d 0/26 auto-obsoleted due to no activity on 2023/07/20 04:17
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (4) ext4 2 862d 883d 0/26 auto-closed as invalid on 2021/11/25 03:42
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (8) fs 2 607d 616d 0/26 auto-closed as invalid on 2022/08/07 13:58
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (10) ext4 1 510d 510d 0/26 auto-obsoleted due to no activity on 2022/11/12 17:32
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (9) ext4 1 568d 568d 0/26 auto-closed as invalid on 2022/09/14 22:08
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (12) ext4 1 340d 340d 0/26 auto-obsoleted due to no activity on 2023/05/01 00:45
upstream KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes (6) ext4 1 739d 739d 0/26 auto-closed as invalid on 2022/03/28 07:47

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

write to 0xffff888106aa5400 of 8 bytes by task 38 on cpu 0:
 writeback_sb_inodes+0x2da/0xad0 fs/fs-writeback.c:1905
 wb_writeback+0x252/0x6e0 fs/fs-writeback.c:2092
 wb_do_writeback fs/fs-writeback.c:2239 [inline]
 wb_workfn+0x1a8/0x8d0 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:243

read to 0xffff888106aa5400 of 8 bytes by task 3306 on cpu 1:
 __mark_inode_dirty+0x58/0x7d0 fs/fs-writeback.c:2434
 mark_inode_dirty include/linux/fs.h:2382 [inline]
 dquot_alloc_space include/linux/quotaops.h:319 [inline]
 dquot_alloc_block include/linux/quotaops.h:336 [inline]
 ext4_mb_new_blocks+0x1041/0x21e0 fs/ext4/mballoc.c:6169
 ext4_ext_map_blocks+0x10a1/0x33b0 fs/ext4/extents.c:4317
 ext4_map_blocks+0x72a/0xf50 fs/ext4/inode.c:623
 ext4_alloc_file_blocks+0x285/0x6f0 fs/ext4/extents.c:4494
 ext4_fallocate+0x77e/0x1180 fs/ext4/extents.c:4791
 vfs_fallocate+0x378/0x3e0 fs/open.c:328
 do_vfs_ioctl+0x12e6/0x13a0 fs/ioctl.c:850
 __do_sys_ioctl fs/ioctl.c:869 [inline]
 __se_sys_ioctl+0x81/0x140 fs/ioctl.c:857
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000020007 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3306 Comm: syz-executor.4 Not tainted 6.8.0-rc5-syzkaller-00381-g70ff1fe626a1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================
syz-executor.4 (3306) used greatest stack depth: 11136 bytes left

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/26 06:10 upstream 70ff1fe626a1 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2024/02/01 05:22 upstream 6764c317b6bb 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2024/01/08 15:38 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/12/15 14:54 upstream 3f7168591ebf 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/11/02 22:43 upstream 4652b8e4f3ff c4ac074c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/10/26 12:18 upstream 611da07b89fd 23afc60f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/09/22 11:39 upstream 27bbf45eae9c 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/08/25 12:49 upstream 4f9e7fabf864 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/08/25 06:23 upstream 4f9e7fabf864 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/08/12 07:45 upstream f8de32cc060b 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
2023/08/07 11:35 upstream 52a93d39b17d 0ef3dfda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / writeback_sb_inodes
* Struck through repros no longer work on HEAD.