syzbot


KCSAN: data-race in write_cache_pages / write_cache_pages (11)

Status: moderation: reported on 2023/12/07 10:04
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+b6cf56329102bc7a5fc7@syzkaller.appspotmail.com
First crash: 217d, last: 33d
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (10) mm fs 26 253d 486d 0/26 auto-obsoleted due to no activity on 2023/07/28 22:24
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (5) mm fs 4 813d 855d 0/26 auto-closed as invalid on 2022/01/15 16:41
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (3) mm fs 1 998d 998d 0/26 auto-closed as invalid on 2021/07/13 22:52
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (4) fs mm 1 946d 946d 0/26 auto-closed as invalid on 2021/09/04 02:13
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (7) fs mm 1 645d 645d 0/26 auto-closed as invalid on 2022/07/02 07:32
upstream KCSAN: data-race in write_cache_pages / write_cache_pages fs mm 2 1509d 1532d 0/26 auto-closed as invalid on 2020/03/24 21:40
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (9) fs mm 1 526d 526d 0/26 auto-obsoleted due to no activity on 2022/10/29 12:30
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (8) fs mm 2 587d 608d 0/26 auto-closed as invalid on 2022/08/29 06:43
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (2) fs mm 2 1211d 1182d 0/26 auto-closed as invalid on 2020/12/21 11:55
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (6) fs mm 2 701d 728d 0/26 auto-closed as invalid on 2022/05/06 22:51

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

write to 0xffff8881004c11f8 of 8 bytes by task 30818 on cpu 1:
 write_cache_pages+0x6f3/0x740 mm/page-writeback.c:2527
 blkdev_writepages+0x59/0x90 block/fops.c:426
 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 __filemap_fdatawrite mm/filemap.c:427 [inline]
 filemap_flush+0x95/0xc0 mm/filemap.c:454
 sync_blockdev_nowait+0x36/0x50 block/bdev.c:189
 sync_filesystem+0xe0/0x180 fs/sync.c:60
 generic_shutdown_super+0x42/0x210 fs/super.c:625
 kill_block_super+0x2a/0x60 fs/super.c:1680
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7319
 deactivate_locked_super+0x7a/0x1c0 fs/super.c:477
 deactivate_super+0x9b/0xb0 fs/super.c:510
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1274
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:108 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
 syscall_exit_to_user_mode+0xbc/0x130 kernel/entry/common.c:212
 do_syscall_64+0x65/0x120 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881004c11f8 of 8 bytes by task 30748 on cpu 0:
 write_cache_pages+0x123/0x740 mm/page-writeback.c:2411
 blkdev_writepages+0x59/0x90 block/fops.c:426
 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
 __writeback_single_inode+0x91/0x860 fs/fs-writeback.c:1625
 writeback_sb_inodes+0x514/0xad0 fs/fs-writeback.c:1916
 __writeback_inodes_wb+0x9a/0x1a0 fs/fs-writeback.c:1987
 wb_writeback+0x264/0x6e0 fs/fs-writeback.c:2094
 wb_check_background_flush fs/fs-writeback.c:2164 [inline]
 wb_do_writeback fs/fs-writeback.c:2252 [inline]
 wb_workfn+0x67f/0x8d0 fs/fs-writeback.c:2279
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa30 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:242

value changed: 0x0000000000000000 -> 0x0000000000000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 30748 Comm: kworker/u4:12 Not tainted 6.8.0-rc2-syzkaller-00031-g861c0981648f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Workqueue: writeback wb_workfn (flush-7:1)
==================================================================
netdevsim netdevsim3 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0
tipc: Left network mode
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
batman_adv: batadv0: Removing interface: batadv_slave_1
team0: left allmulticast mode
team_slave_0: left allmulticast mode
team_slave_1: left allmulticast mode
team0: left promiscuous mode
team_slave_0: left promiscuous mode
team_slave_1: left promiscuous mode
bridge0: port 3(team0) entered disabled state
bridge_slave_1: left allmulticast mode
bridge_slave_1: left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_0: left allmulticast mode
bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
veth1_macvtap: left promiscuous mode
veth0_macvtap: left promiscuous mode
veth1_vlan: left promiscuous mode
bond2 (unregistering): Released all slaves
bond1 (unregistering): Released all slaves
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): Released all slaves

Crashes (24):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/30 07:36 upstream 861c0981648f 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2024/01/13 14:38 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/12/23 18:13 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/12/21 14:20 upstream a4aebe936554 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/12/18 11:13 upstream ceb6a6f023fd 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/12/08 17:56 upstream 5e3f5b81de80 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/12/08 12:14 upstream 9ace34a8e446 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/12/02 18:09 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/11/29 16:05 upstream 18d46e76d7c2 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/11/19 23:20 upstream eb3479bc23fa cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/11/18 18:57 upstream 23dfa043f6d5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/11/16 06:51 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/10/29 18:35 upstream 2af9b20dbb39 3c418d72 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/10/18 03:49 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/28 16:27 upstream 633b47cb009d d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/22 09:33 upstream 27bbf45eae9c 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/22 00:42 upstream b5cbe7c00aa0 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/13 21:32 upstream 3669558bdf35 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/06 17:43 upstream 65d6e954e378 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/04 16:15 upstream 708283abf896 db3306a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/09/03 23:21 upstream 6e32dfcccfcc 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/08/18 00:40 upstream 16931859a650 74b106b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/08/05 18:26 upstream 024ff300db33 4ffcc9ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
2023/07/30 13:50 upstream d31e3792919e 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in write_cache_pages / write_cache_pages
* Struck through repros no longer work on HEAD.