================================================================== BUG: KCSAN: data-race in alloc_empty_file / percpu_counter_add_batch write to 0xffffffff85a08548 of 8 bytes by task 8102 on cpu 0: percpu_counter_add_batch+0xca/0x150 lib/percpu_counter.c:91 percpu_counter_add include/linux/percpu_counter.h:55 [inline] percpu_counter_dec include/linux/percpu_counter.h:184 [inline] file_free fs/file_table.c:57 [inline] __fput+0x35d/0x520 fs/file_table.c:298 ____fput+0x1f/0x30 fs/file_table.c:313 task_work_run+0xf6/0x130 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x353/0x370 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x44/0xa9 read to 0xffffffff85a08548 of 8 bytes by task 8080 on cpu 1: get_nr_files fs/file_table.c:66 [inline] alloc_empty_file+0x2d/0x180 fs/file_table.c:142 path_openat+0x74/0x36e0 fs/namei.c:3514 do_filp_open+0x11e/0x1b0 fs/namei.c:3555 do_sys_open+0x3b3/0x4f0 fs/open.c:1097 __do_sys_open fs/open.c:1115 [inline] __se_sys_open fs/open.c:1110 [inline] __x64_sys_open+0x55/0x70 fs/open.c:1110 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 8080 Comm: ps Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 8080 Comm: ps Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xf5/0x159 lib/dump_stack.c:113 panic+0x210/0x640 kernel/panic.c:221 kcsan_report.cold+0xc/0xe kernel/kcsan/report.c:302 kcsan_setup_watchpoint+0x3fe/0x410 kernel/kcsan/core.c:357 check_access kernel/kcsan/core.c:409 [inline] __tsan_read8+0x145/0x1f0 kernel/kcsan/core.c:530 get_nr_files fs/file_table.c:66 [inline] alloc_empty_file+0x2d/0x180 fs/file_table.c:142 path_openat+0x74/0x36e0 fs/namei.c:3514 do_filp_open+0x11e/0x1b0 fs/namei.c:3555 do_sys_open+0x3b3/0x4f0 fs/open.c:1097 __do_sys_open fs/open.c:1115 [inline] __se_sys_open fs/open.c:1110 [inline] __x64_sys_open+0x55/0x70 fs/open.c:1110 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f0b7150c120 Code: 48 8b 15 1b 4d 2b 00 f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 83 3d d5 a4 2b 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 5e 8c 01 00 48 89 04 24 RSP: 002b:00007ffd81d2a1b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000616760 RCX: 00007f0b7150c120 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f0b719dad00 RBP: 0000000000001000 R08: 0000000000000000 R09: 00007f0b717d457b R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0b719d9d00 R13: 0000000000000020 R14: 0000000000000005 R15: 0000000000000000 Kernel Offset: disabled Rebooting in 86400 seconds..