syzbot


KCSAN: data-race in ext4_nonda_switch / percpu_counter_add_batch (2)

Status: auto-closed as invalid on 2020/06/18 13:11
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+2a8ddd9ff1a9c8504e2f@syzkaller.appspotmail.com
First crash: 1618d, last: 1473d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_nonda_switch / percpu_counter_add_batch ext4 37 1620d 1654d 0/26 closed as invalid on 2019/11/19 14:04

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

write to 0xffff8882183cf958 of 8 bytes by task 19273 on cpu 0:
 percpu_counter_add_batch+0xbc/0x140 lib/percpu_counter.c:91
 percpu_counter_add include/linux/percpu_counter.h:55 [inline]
 ext4_claim_free_clusters+0x64/0x80 fs/ext4/balloc.c:602
 ext4_da_reserve_space+0xf8/0x270 fs/ext4/inode.c:1464
 ext4_insert_delayed_block fs/ext4/inode.c:1632 [inline]
 ext4_da_map_blocks fs/ext4/inode.c:1747 [inline]
 ext4_da_get_block_prep+0x87e/0xa50 fs/ext4/inode.c:1811
 ext4_block_write_begin+0x336/0xbd0 fs/ext4/inode.c:1054
 ext4_da_write_begin+0x220/0x860 fs/ext4/inode.c:2997
 generic_perform_write+0x13a/0x320 mm/filemap.c:3287
 ext4_buffered_write_iter+0x14e/0x280 fs/ext4/file.c:270
 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:693
 do_iter_write fs/read_write.c:998 [inline]
 do_iter_write+0x137/0x3a0 fs/read_write.c:979
 vfs_iter_write+0x56/0x80 fs/read_write.c:1039
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x396/0x810 fs/read_write.c:1520
 __do_sys_sendfile64 fs/read_write.c:1575 [inline]
 __se_sys_sendfile64 fs/read_write.c:1567 [inline]
 __x64_sys_sendfile64+0xb8/0x140 fs/read_write.c:1567
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8882183cf958 of 8 bytes by task 19275 on cpu 1:
 ext4_nonda_switch+0x58/0x130 fs/ext4/inode.c:2893
 ext4_da_write_begin+0xcc/0x860 fs/ext4/inode.c:2939
 generic_perform_write+0x13a/0x320 mm/filemap.c:3287
 ext4_buffered_write_iter+0x14e/0x280 fs/ext4/file.c:270
 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1901 [inline]
 new_sync_write+0x303/0x400 fs/read_write.c:483
 __vfs_write+0x9e/0xb0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x189/0x380 fs/read_write.c:542
 ksys_write+0xc5/0x1a0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x49/0x60 fs/read_write.c:620
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19275 Comm: syz-executor.1 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (165):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/04/14 18:35 https://github.com/google/ktsan.git kcsan 40959e34d670 3f3c5574 .config console log report ci2-upstream-kcsan-gce
2020/04/13 21:59 https://github.com/google/ktsan.git kcsan 40959e34d670 7c54686a .config console log report ci2-upstream-kcsan-gce
2020/04/12 23:56 https://github.com/google/ktsan.git kcsan 40959e34d670 17a986e5 .config console log report ci2-upstream-kcsan-gce
2020/04/12 14:30 https://github.com/google/ktsan.git kcsan 40959e34d670 36b0b050 .config console log report ci2-upstream-kcsan-gce
2020/04/09 08:15 https://github.com/google/ktsan.git kcsan 40959e34d670 a8c6a3f8 .config console log report ci2-upstream-kcsan-gce
2020/04/07 17:51 https://github.com/google/ktsan.git kcsan 40959e34d670 db9bcd4b .config console log report ci2-upstream-kcsan-gce
2020/04/06 20:23 https://github.com/google/ktsan.git kcsan 40959e34d670 99a96044 .config console log report ci2-upstream-kcsan-gce
2020/04/03 21:44 https://github.com/google/ktsan.git kcsan 40959e34d670 ef26b610 .config console log report ci2-upstream-kcsan-gce
2020/04/03 12:05 https://github.com/google/ktsan.git kcsan 40959e34d670 5ed396e6 .config console log report ci2-upstream-kcsan-gce
2020/04/01 07:49 https://github.com/google/ktsan.git kcsan 40959e34d670 a34e2c33 .config console log report ci2-upstream-kcsan-gce
2020/03/30 09:08 https://github.com/google/ktsan.git kcsan 40959e34d670 c8d1cc20 .config console log report ci2-upstream-kcsan-gce
2020/03/28 23:44 https://github.com/google/ktsan.git kcsan 40959e34d670 05736b29 .config console log report ci2-upstream-kcsan-gce
2020/03/28 12:28 https://github.com/google/ktsan.git kcsan 40959e34d670 f1ebdfba .config console log report ci2-upstream-kcsan-gce
2020/03/27 13:47 https://github.com/google/ktsan.git kcsan 40959e34d670 831e9a81 .config console log report ci2-upstream-kcsan-gce
2020/03/26 20:48 https://github.com/google/ktsan.git kcsan 40959e34d670 6d25c5a0 .config console log report ci2-upstream-kcsan-gce
2020/03/25 20:32 https://github.com/google/ktsan.git kcsan 40959e34d670 e8e6c7d2 .config console log report ci2-upstream-kcsan-gce
2020/03/25 15:40 https://github.com/google/ktsan.git kcsan 40959e34d670 e8e6c7d2 .config console log report ci2-upstream-kcsan-gce
2020/03/25 04:56 https://github.com/google/ktsan.git kcsan 40959e34d670 41f049cc .config console log report ci2-upstream-kcsan-gce
2020/03/24 16:31 https://github.com/google/ktsan.git kcsan 40959e34d670 68660b21 .config console log report ci2-upstream-kcsan-gce
2020/03/24 11:23 https://github.com/google/ktsan.git kcsan 40959e34d670 33e14df3 .config console log report ci2-upstream-kcsan-gce
2020/03/23 17:36 https://github.com/google/ktsan.git kcsan 40959e34d670 84f999d6 .config console log report ci2-upstream-kcsan-gce
2020/03/21 18:37 https://github.com/google/ktsan.git kcsan 40959e34d670 78267cec .config console log report ci2-upstream-kcsan-gce
2020/03/21 06:21 https://github.com/google/ktsan.git kcsan 40959e34d670 aa6c6a55 .config console log report ci2-upstream-kcsan-gce
2020/03/18 23:15 https://github.com/google/ktsan.git kcsan 40959e34d670 2c31c529 .config console log report ci2-upstream-kcsan-gce
2020/03/18 10:37 https://github.com/google/ktsan.git kcsan 941e0d917bbf 0a96a13c .config console log report ci2-upstream-kcsan-gce
2020/03/17 21:31 https://github.com/google/ktsan.git kcsan 941e0d917bbf 97bc55ce .config console log report ci2-upstream-kcsan-gce
2020/03/14 17:28 https://github.com/google/ktsan.git kcsan 941e0d917bbf 749688d2 .config console log report ci2-upstream-kcsan-gce
2020/03/13 07:45 https://github.com/google/ktsan.git kcsan 941e0d917bbf fd69032d .config console log report ci2-upstream-kcsan-gce
2020/03/11 23:57 https://github.com/google/ktsan.git kcsan 941e0d917bbf d850e9d0 .config console log report ci2-upstream-kcsan-gce
2020/03/11 15:08 https://github.com/google/ktsan.git kcsan 941e0d917bbf e103bc9e .config console log report ci2-upstream-kcsan-gce
2020/03/09 14:36 https://github.com/google/ktsan.git kcsan 941e0d917bbf 35f53e45 .config console log report ci2-upstream-kcsan-gce
2020/03/07 10:35 https://github.com/google/ktsan.git kcsan 941e0d917bbf 2e9971bb .config console log report ci2-upstream-kcsan-gce
2020/03/07 02:30 https://github.com/google/ktsan.git kcsan 941e0d917bbf fd2a5f28 .config console log report ci2-upstream-kcsan-gce
2020/03/06 12:08 https://github.com/google/ktsan.git kcsan 766d004d1b85 7fb694ef .config console log report ci2-upstream-kcsan-gce
2020/03/05 13:35 https://github.com/google/ktsan.git kcsan 766d004d1b85 b655d91b .config console log report ci2-upstream-kcsan-gce
2020/03/04 22:28 https://github.com/google/ktsan.git kcsan 766d004d1b85 576fb9bc .config console log report ci2-upstream-kcsan-gce
2020/03/04 13:35 https://github.com/google/ktsan.git kcsan 766d004d1b85 712198ac .config console log report ci2-upstream-kcsan-gce
2020/03/04 02:39 https://github.com/google/ktsan.git kcsan 766d004d1b85 1f73b64b .config console log report ci2-upstream-kcsan-gce
2020/03/03 08:19 https://github.com/google/ktsan.git kcsan 766d004d1b85 350a7a26 .config console log report ci2-upstream-kcsan-gce
2020/03/02 00:08 https://github.com/google/ktsan.git kcsan 766d004d1b85 4a4e0509 .config console log report ci2-upstream-kcsan-gce
2020/02/27 23:04 https://github.com/google/ktsan.git kcsan 766d004d1b85 c88c7b75 .config console log report ci2-upstream-kcsan-gce
2020/02/27 11:15 https://github.com/google/ktsan.git kcsan 766d004d1b85 40bcfdd5 .config console log report ci2-upstream-kcsan-gce
2020/02/26 16:16 https://github.com/google/ktsan.git kcsan 766d004d1b85 251aabb7 .config console log report ci2-upstream-kcsan-gce
2020/02/26 02:14 https://github.com/google/ktsan.git kcsan 766d004d1b85 4f588111 .config console log report ci2-upstream-kcsan-gce
2020/02/25 14:46 https://github.com/google/ktsan.git kcsan 766d004d1b85 4c886d6a .config console log report ci2-upstream-kcsan-gce
2020/01/06 20:37 https://github.com/google/ktsan.git kcsan 245a43005292 53430d97 .config console log report ci2-upstream-kcsan-gce
2019/11/20 22:25 https://github.com/google/ktsan.git kcsan 5863cc791e4c 8098ea0f .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.