syzbot


KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks (4)

Status: auto-closed as invalid on 2021/11/01 11:30
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 549d, last: 425d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks (2) 1 745d 719d 0/24 auto-closed as invalid on 2020/12/21 12:00
upstream KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks 1 883d 883d 0/24 auto-closed as invalid on 2020/07/31 02:03
upstream KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks (3) 2 601d 601d 0/24 auto-closed as invalid on 2021/05/17 09:51

Sample crash report:
R10: 0000000040000006 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fff3040442f R14: 00007fb42d97e300 R15: 0000000000022000
==================================================================
BUG: KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks

write to 0xffff8881010f63d4 of 4 bytes by task 1156 on cpu 1:
 mb_free_blocks+0x156/0xb40 fs/ext4/mballoc.c:1802
 ext4_free_blocks+0x14ea/0x1c20 fs/ext4/mballoc.c:6061
 ext4_remove_blocks+0x61a/0x800 fs/ext4/extents.c:2506
 ext4_ext_rm_leaf+0x684/0xd40 fs/ext4/extents.c:2672
 ext4_ext_remove_space+0x8f6/0x12b0 fs/ext4/extents.c:2920
 ext4_ext_truncate+0xfe/0x170 fs/ext4/extents.c:4382
 ext4_truncate+0x76e/0xa80 fs/ext4/inode.c:4268
 ext4_evict_inode+0xa54/0xdb0 fs/ext4/inode.c:287
 evict+0x1c8/0x3c0 fs/inode.c:588
 iput_final fs/inode.c:1664 [inline]
 iput+0x430/0x580 fs/inode.c:1690
 do_unlinkat+0x2d4/0x540 fs/namei.c:4176
 __do_sys_unlink fs/namei.c:4217 [inline]
 __se_sys_unlink fs/namei.c:4215 [inline]
 __x64_sys_unlink+0x2c/0x30 fs/namei.c:4215
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881010f63d4 of 4 bytes by task 7027 on cpu 0:
 ext4_mb_find_by_goal+0x13a/0x8a0 fs/ext4/mballoc.c:2207
 ext4_mb_regular_allocator+0x130/0x2530 fs/ext4/mballoc.c:2654
 ext4_mb_new_blocks+0x792/0x1fc0 fs/ext4/mballoc.c:5586
 ext4_ext_map_blocks+0x15ed/0x1ff0 fs/ext4/extents.c:4250
 ext4_map_blocks+0x71e/0xf00 fs/ext4/inode.c:637
 ext4_alloc_file_blocks+0x281/0x730 fs/ext4/extents.c:4437
 ext4_fallocate+0x2a7/0x4d0 fs/ext4/extents.c:4718
 vfs_fallocate+0x459/0x6a0 fs/open.c:307
 ksys_fallocate fs/open.c:330 [inline]
 __do_sys_fallocate fs/open.c:338 [inline]
 __se_sys_fallocate fs/open.c:336 [inline]
 __x64_sys_fallocate+0x75/0xc0 fs/open.c:336
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00002800 -> 0x00002f80

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

Crashes (12):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/27 11:27 upstream 5816b3e6577e 78494d16 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/09/08 19:35 upstream ac08b1c68d1b e2776ee4 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/08/29 09:24 upstream 3f5ad13cb012 be2c130d .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/08/14 07:32 upstream dfa377c35d70 2489ab88 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/08/11 23:00 upstream 761c6d7ec820 6972b106 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/07/21 14:10 upstream 8cae8cd89f05 29c3f20f .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/07/15 12:01 upstream 8096acd7442e b9a2f64e .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/07/14 06:21 upstream 40226a3d96ef 484502bd .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/07/02 04:40 upstream e058a84bfddc 658ebc66 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/06/25 06:46 upstream 4a09d388f2ab 0edbbe31 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/06/14 19:37 upstream 009c9aa5be65 1ba81399 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
ci2-upstream-kcsan-gce 2021/05/26 06:07 upstream ad9f25d33860 93d3a9f6 .config log report info KCSAN: data-race in ext4_mb_find_by_goal / mb_free_blocks
* Struck through repros no longer work on HEAD.