syzbot


KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size

Status: auto-closed as invalid on 2021/11/17 22:00
Reported-by: syzbot+43585170234428c94320@syzkaller.appspotmail.com
First crash: 578d, last: 413d

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

write to 0xffff8881010d8854 of 4 bytes by task 1124 on cpu 0:
 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:4204
 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 0xffff8881010d8854 of 4 bytes by task 1220 on cpu 1:
 ext4_mb_avg_fragment_size_cmp fs/ext4/mballoc.c:839 [inline]
 ext4_mb_rb_insert fs/ext4/mballoc.c:815 [inline]
 mb_update_avg_fragment_size+0x184/0x260 fs/ext4/mballoc.c:863
 mb_mark_used+0xae0/0xc50 fs/ext4/mballoc.c:1998
 ext4_mb_use_best_found+0x102/0x320 fs/ext4/mballoc.c:2019
 ext4_mb_measure_extent fs/ext4/mballoc.c:2135 [inline]
 ext4_mb_complex_scan_group+0x359/0x880 fs/ext4/mballoc.c:2365
 ext4_mb_regular_allocator+0x1a32/0x2530 fs/ext4/mballoc.c:2778
 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_getblk+0xc6/0x3e0 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+0x2c3/0x3e0 fs/namei.c:3885
 do_mkdirat+0x12e/0x2c0 fs/namei.c:3911
 __do_sys_mkdir fs/namei.c:3931 [inline]
 __se_sys_mkdir fs/namei.c:3929 [inline]
 __x64_sys_mkdir+0x40/0x50 fs/namei.c:3929
 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: 0x000060a4 -> 0x00006254

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

Crashes (59):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/10/13 22:00 upstream 348949d9a444 5462d470 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/09 16:54 upstream 5d6ab0bb408f 838e7e2c .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/07 19:43 upstream 4a16df549d23 efe0f24d .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/07 14:55 upstream 5af4055fa813 62ee0987 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/06 04:10 upstream 60a9483534ed 0a63fd36 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/04 19:11 upstream 9e1ff307c779 ce697b49 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/03 17:44 upstream 7b66f4393ad4 db0f5787 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/10/01 09:07 upstream 4de593fb965f 1d849ab4 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/25 06:46 upstream 7d42e9818258 8cac236e .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/23 03:41 upstream cf1d2c3e7e2f 8cac236e .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/22 06:00 upstream 92477dd1faa6 169724fe .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/20 12:39 upstream e4e737bb5c17 3d9c9a2a .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/18 11:43 upstream 4357f03d6611 70b76c1d .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/16 19:00 upstream ff1ffd71d5f0 aae492f2 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/09/04 03:00 upstream a9c9a6f741cd d236a457 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/31 22:11 upstream b91db6a0b52e 7eb7e152 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/27 18:21 upstream 1a6436f37512 57b01c6e .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/22 21:08 upstream 1bdc3d5be7e1 b599f2fc .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/22 03:27 upstream 002c0aef1090 b599f2fc .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/17 11:28 upstream a2824f19e606 33c26cb7 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/08 08:56 upstream 85a90500f9a1 6972b106 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/06 00:49 upstream e04480920d1e d2d6e680 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/08/02 07:23 upstream d4affd6b6e81 6c236867 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/29 22:42 upstream 7e96bf476270 8a799410 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/26 09:13 upstream ff1176468d36 fd511809 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/23 11:31 upstream 9bead1b58c4c bc5f1d88 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/18 01:24 upstream 1d67c8d993ba f115ae98 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/16 09:16 upstream d936eb238744 f115ae98 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/16 06:20 upstream dd9c7df94c1b f115ae98 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/13 01:01 upstream 7fef2edf7cc7 f415556d .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/12 16:40 upstream e73f0f0ee754 a4869c92 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/06 01:24 upstream 3dbdb38e2869 55aa55c2 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/07/02 10:22 upstream e058a84bfddc 658ebc66 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/20 05:27 upstream 913ec3c22ef4 aba2b2fb .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/19 09:36 upstream 9ed13a17e38e aba2b2fb .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/19 07:03 upstream b1edae0d5f2e aba2b2fb .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/16 19:06 upstream 6b00bc639f1f c06f97ad .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/12 09:09 upstream f21b807c3cf8 1ba81399 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/11 07:08 upstream f09eacca59d2 1ba81399 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/10 11:24 upstream cd1245d75ce9 1ba81399 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/06 23:19 upstream decad3e1d1ed 500c2339 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/03 23:48 upstream f88cd3fb9df2 0740de69 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/06/02 18:13 upstream 231bc5390667 0740de69 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/31 06:08 upstream 8124c8a6b353 325a8dab .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/29 12:53 upstream 6799d4f2da49 858ea628 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/23 23:25 upstream 6ebb6814a1ef 3c7fef33 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/23 16:24 upstream 4d7620341eda 3c7fef33 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/22 16:02 upstream 45af60e7ced0 3c7fef33 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/21 06:52 upstream ba816d3c265c 3c7fef33 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/20 00:40 upstream c3d0e3fd41b7 a343ba6b .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/18 09:52 upstream 8ac91e6c6033 a343ba6b .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/17 13:28 upstream d07f6ca923ea a2eb125d .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/16 23:07 upstream 63d1cb53e26a f54a5c09 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/14 00:34 upstream c06a2ba62fc4 ecb594cb .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/13 01:26 upstream dbb5afad100a ed7d41c5 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/09 05:04 upstream b741596468b0 bc5434be .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/07 09:57 upstream e48661230cc3 f6da8120 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/04 21:10 upstream 5e321ded302d 06c27ff5 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
ci2-upstream-kcsan-gce 2021/05/01 16:46 upstream 9f67672a817e 77e2b668 .config log report info KCSAN: data-race in mb_free_blocks / mb_update_avg_fragment_size
* Struck through repros no longer work on HEAD.