================================================================== BUG: KCSAN: data-race in __cgroup_account_cputime_field / cgroup_rstat_flush_locked read-write to 0xffffe8ffffd77fa8 of 8 bytes by interrupt on cpu 1: __cgroup_account_cputime_field+0x98/0x100 cgroup_account_cputime_field include/linux/cgroup.h:737 [inline] task_group_account_field kernel/sched/cputime.c:113 [inline] account_system_index_time+0x72/0x80 kernel/sched/cputime.c:176 update_process_times+0x22/0x110 kernel/time/timer.c:2069 tick_sched_handle kernel/time/tick-sched.c:243 [inline] tick_sched_timer+0x233/0x2b0 kernel/time/tick-sched.c:1480 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x3d8/0x7b0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1096 [inline] __sysvec_apic_timer_interrupt+0x73/0x210 arch/x86/kernel/apic/apic.c:1113 sysvec_apic_timer_interrupt+0x68/0x80 arch/x86/kernel/apic/apic.c:1107 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 __preempt_count_dec_and_test arch/x86/include/asm/preempt.h:95 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0x3d/0x50 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:405 [inline] pcpu_alloc+0x81e/0x1280 mm/percpu.c:1843 __alloc_percpu+0x24/0x30 mm/percpu.c:1943 xt_percpu_counter_alloc+0x72/0x110 net/netfilter/x_tables.c:1930 find_check_entry net/ipv4/netfilter/ip_tables.c:528 [inline] translate_table+0x90b/0xf60 net/ipv4/netfilter/ip_tables.c:718 do_replace net/ipv4/netfilter/ip_tables.c:1135 [inline] do_ipt_set_ctl+0x13d1/0x1710 net/ipv4/netfilter/ip_tables.c:1629 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0xe6/0x100 net/ipv4/ip_sockglue.c:1460 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3804 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3668 __sys_setsockopt+0x1c3/0x230 net/socket.c:2271 __do_sys_setsockopt net/socket.c:2282 [inline] __se_sys_setsockopt net/socket.c:2279 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2279 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffffe8ffffd77fa8 of 8 bytes by task 5594 on cpu 0: cgroup_base_stat_flush kernel/cgroup/rstat.c:373 [inline] cgroup_rstat_flush_locked+0x2c3/0x700 kernel/cgroup/rstat.c:199 cgroup_rstat_flush_irqsafe+0x28/0x40 kernel/cgroup/rstat.c:254 __mem_cgroup_flush_stats mm/memcontrol.c:645 [inline] mem_cgroup_flush_stats+0xc5/0x120 mm/memcontrol.c:653 prepare_scan_count mm/vmscan.c:2848 [inline] shrink_node+0x321/0x14f0 mm/vmscan.c:6471 shrink_zones mm/vmscan.c:6711 [inline] do_try_to_free_pages+0x40d/0xc80 mm/vmscan.c:6773 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:7088 try_charge_memcg+0x27d/0xd20 mm/memcontrol.c:2695 try_charge mm/memcontrol.c:2837 [inline] mem_cgroup_charge_skmem+0x51/0x1c0 mm/memcontrol.c:7290 sock_reserve_memory+0xb1/0x370 net/core/sock.c:1025 sk_setsockopt+0x800/0x1e70 net/core/sock.c:1525 sock_setsockopt+0x3c/0x50 net/core/sock.c:1551 __sys_setsockopt+0x177/0x230 net/socket.c:2267 __do_sys_setsockopt net/socket.c:2282 [inline] __se_sys_setsockopt net/socket.c:2279 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2279 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x000000005358615b -> 0x0000000053f0f7db Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 5594 Comm: syz-executor.1 Not tainted 6.3.0-rc6-syzkaller-00173-g7a934f4bd7d6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 ==================================================================