================================================================== BUG: KCSAN: data-race in yama_task_free / yama_task_free write to 0xffff88812182cf50 of 1 bytes by interrupt on cpu 0: yama_ptracer_del security/yama/yama_lsm.c:191 [inline] yama_task_free+0xc6/0x150 security/yama/yama_lsm.c:207 security_task_free+0x3f/0xa0 security/security.c:1580 __put_task_struct+0x96/0x370 kernel/fork.c:750 put_task_struct include/linux/sched/task.h:126 [inline] delayed_put_task_struct+0x52/0x160 kernel/exit.c:172 rcu_do_batch kernel/rcu/tree.c:2396 [inline] rcu_core+0x606/0xb60 kernel/rcu/tree.c:2623 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2632 __do_softirq+0x198/0x360 kernel/softirq.c:292 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x5d/0x80 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:387 [inline] __irq_exit_rcu+0x115/0x120 kernel/softirq.c:417 sysvec_apic_timer_interrupt+0xd9/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:596 refcount_add include/linux/refcount.h:206 [inline] refcount_inc include/linux/refcount.h:241 [inline] get_ctx kernel/events/core.c:1237 [inline] perf_event_init_context kernel/events/core.c:12660 [inline] perf_event_init_task+0x47a/0x4c0 kernel/events/core.c:12685 copy_process+0xff6/0x32b0 kernel/fork.c:2072 _do_fork+0xf1/0x660 kernel/fork.c:2443 kernel_thread+0x85/0xb0 kernel/fork.c:2531 create_kthread kernel/kthread.c:314 [inline] kthreadd+0x317/0x3d0 kernel/kthread.c:632 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 read to 0xffff88812182cf50 of 1 bytes by interrupt on cpu 1: yama_ptracer_del security/yama/yama_lsm.c:187 [inline] yama_task_free+0x61/0x150 security/yama/yama_lsm.c:207 security_task_free+0x3f/0xa0 security/security.c:1580 __put_task_struct+0x96/0x370 kernel/fork.c:750 put_task_struct include/linux/sched/task.h:126 [inline] delayed_put_task_struct+0x52/0x160 kernel/exit.c:172 rcu_do_batch kernel/rcu/tree.c:2396 [inline] rcu_core+0x606/0xb60 kernel/rcu/tree.c:2623 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2632 __do_softirq+0x198/0x360 kernel/softirq.c:292 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x5d/0x80 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:387 [inline] __irq_exit_rcu+0x115/0x120 kernel/softirq.c:417 sysvec_apic_timer_interrupt+0xd9/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:596 arch_local_irq_restore arch/x86/include/asm/paravirt.h:765 [inline] kcsan_setup_watchpoint+0x47c/0x4d0 kernel/kcsan/core.c:542 rcu_preempt_read_exit kernel/rcu/tree_plugin.h:359 [inline] __rcu_read_unlock+0x25/0x260 kernel/rcu/tree_plugin.h:392 rcu_read_unlock include/linux/rcupdate.h:687 [inline] inet_twsk_purge+0x3c5/0x400 net/ipv4/inet_timewait_sock.c:299 dccp_v4_exit_batch+0x16/0x20 net/dccp/ipv4.c:1030 ops_exit_list net/core/net_namespace.c:189 [inline] cleanup_net+0x4dc/0x8c0 net/core/net_namespace.c:603 process_one_work+0x3cb/0x990 kernel/workqueue.c:2269 worker_thread+0x665/0xbe0 kernel/workqueue.c:2415 kthread+0x210/0x220 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 21 Comm: kworker/u4:1 Not tainted 5.8.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net ==================================================================