syzbot


KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used (3)

Status: closed as invalid on 2022/05/13 11:20
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 203d, last: 199d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used (2) 4 297d 299d 0/24 auto-closed as invalid on 2022/03/11 01:18
upstream KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used 675 342d 852d 0/24 auto-closed as invalid on 2022/01/25 08:42

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

read-write to 0xffff888102814b54 of 4 bytes by task 18137 on cpu 1:
 mb_mark_used+0x124/0xb80 fs/ext4/mballoc.c:1947
 ext4_mb_use_best_found+0x105/0x440 fs/ext4/mballoc.c:2019
 ext4_mb_complex_scan_group+0x357/0x870 fs/ext4/mballoc.c:2365
 ext4_mb_regular_allocator+0x1882/0x1ff0 fs/ext4/mballoc.c:2778
 ext4_mb_new_blocks+0x839/0xfd0 fs/ext4/mballoc.c:5616
 ext4_ext_map_blocks+0xd55/0x1bb0 fs/ext4/extents.c:4281
 ext4_map_blocks+0x75b/0xfc0 fs/ext4/inode.c:636
 ext4_getblk+0xcb/0x410 fs/ext4/inode.c:847
 ext4_bread+0x28/0x100 fs/ext4/inode.c:900
 ext4_append+0xd1/0x1c0 fs/ext4/namei.c:67
 ext4_init_new_dir+0x177/0x500 fs/ext4/namei.c:2893
 ext4_mkdir+0x329/0x760 fs/ext4/namei.c:2939
 vfs_mkdir+0x216/0x320 fs/namei.c:3931
 do_mkdirat+0x105/0x280 fs/namei.c:3957
 __do_sys_mkdirat fs/namei.c:3972 [inline]
 __se_sys_mkdirat fs/namei.c:3970 [inline]
 __x64_sys_mkdirat+0x4c/0x60 fs/namei.c:3970
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888102814b54 of 4 bytes by task 1838 on cpu 0:
 ext4_mb_good_group_nolock fs/ext4/mballoc.c:2504 [inline]
 ext4_mb_regular_allocator+0xac9/0x1ff0 fs/ext4/mballoc.c:2747
 ext4_mb_new_blocks+0x839/0xfd0 fs/ext4/mballoc.c:5616
 ext4_ext_map_blocks+0xd55/0x1bb0 fs/ext4/extents.c:4281
 ext4_map_blocks+0x75b/0xfc0 fs/ext4/inode.c:636
 ext4_getblk+0xcb/0x410 fs/ext4/inode.c:847
 ext4_bread+0x28/0x100 fs/ext4/inode.c:900
 ext4_append+0xd1/0x1c0 fs/ext4/namei.c:67
 ext4_init_new_dir+0x177/0x500 fs/ext4/namei.c:2893
 ext4_mkdir+0x329/0x760 fs/ext4/namei.c:2939
 vfs_mkdir+0x216/0x320 fs/namei.c:3931
 do_mkdirat+0x105/0x280 fs/namei.c:3957
 __do_sys_mkdirat fs/namei.c:3972 [inline]
 __se_sys_mkdirat fs/namei.c:3970 [inline]
 __x64_sys_mkdirat+0x4c/0x60 fs/namei.c:3970
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000007f4 -> 0x000007f3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1838 Comm: syz-executor.3 Tainted: G        W         5.18.0-rc6-syzkaller-00009-gfeb9c5e19e91 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (6):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/05/12 17:02 upstream feb9c5e19e91 9ad6612a .config log report info KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used
ci2-upstream-kcsan-gce 2022/05/11 08:06 upstream feb9c5e19e91 8d7b3b67 .config log report info KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used
ci2-upstream-kcsan-gce 2022/05/11 07:40 upstream feb9c5e19e91 8d7b3b67 .config log report info KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used
ci2-upstream-kcsan-gce 2022/05/09 21:19 upstream 9be9ed2612b5 8b277b8e .config log report info KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used
ci2-upstream-kcsan-gce 2022/05/09 14:14 upstream c5eb0a61238d 8b277b8e .config log report info KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used
ci2-upstream-kcsan-gce 2022/05/09 06:28 upstream c5eb0a61238d e60b1103 .config log report info KCSAN: data-race in ext4_mb_regular_allocator / mb_mark_used
* Struck through repros no longer work on HEAD.