Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
kernel BUG in css_release
!!!!!!!!!!! css_release ALREADY QUEUED !!!!!!!!!!!!!!!!!!!!!!
------------[ cut here ]------------
kernel BUG at kernel/cgroup/cgroup.c:5219!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.18.0-rc2-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:css_release+0xfb/0x100 kernel/cgroup/cgroup.c:5219
Code: b6 3d 05 bf 08 00 00 00 48 89 da e8 9f 5e e1 ff 5b 41 5e 41 5f 5d c3 e8 a3 32 08 00 48 c7 c7 00 33 0c 85 31 c0 e8 35 c2 44 03 <0f> 0b 0f 1f 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 18
RSP: 0018:ffffc90000007ba0 EFLAGS: 00010246
RAX: 000000000000003d RBX: ffff888117832c68 RCX: e6f6b9858a001200
RDX: 0000000000000101 RSI: 0000000000000101 RDI: 0000000000000000
RBP: ffffc90000007bb8 R08: ffffffff8157ac48 R09: ffffed103ee465d1
R10: ffffed103ee465d1 R11: 1ffff1103ee465d0 R12: ffff888117832c10
R13: ffff88811842fc00 R14: ffff888117832c01 R15: ffff888117832c18
FS: 0000000000000000(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2a75e05a28 CR3: 000000012112d000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
percpu_ref_put_many include/linux/percpu-refcount.h:335 [inline]
percpu_ref_put include/linux/percpu-refcount.h:351 [inline]
percpu_ref_call_confirm_rcu lib/percpu-refcount.c:163 [inline]
percpu_ref_switch_to_atomic_rcu+0x60d/0x620 lib/percpu-refcount.c:205
rcu_do_batch+0x507/0xbc0 kernel/rcu/tree.c:2535
rcu_core+0x4dc/0xef0 kernel/rcu/tree.c:2786
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2803
__do_softirq+0x24e/0x586 kernel/softirq.c:558
invoke_softirq+0x70/0xd0 kernel/softirq.c:432
__irq_exit_rcu+0x4f/0xb0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x10 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x9a/0xc0 arch/x86/kernel/apic/apic.c:1097
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:40 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:75 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:116 [inline]
RIP: 0010:acpi_idle_do_entry+0xb8/0x1f0 drivers/acpi/processor_idle.c:556
Code: 8b 1b 48 89 de 48 83 e6 08 31 ff e8 42 b6 bd fc 48 83 e3 08 0f 85 ab 00 00 00 eb 0c e8 11 b1 bd fc 0f 00 2d 8a cb bc 00 fb f4 <fa> e9 a1 00 00 00 49 83 c6 04 4c 89 f0 48 c1 e8 03 42 8a 04 38 84
RSP: 0018:ffffffff86007be8 EFLAGS: 00000246
RAX: 1ffffffff0c03630 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffffffff8601b180 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff86007c00 R08: ffffffff84b2db3e R09: fffffbfff0c03631
R10: fffffbfff0c03631 R11: 1ffffffff0c03630 R12: 0000000000000001
R13: ffff888100072804 R14: ffff8881091aa864 R15: dffffc0000000000
acpi_idle_enter+0x32d/0x4f0 drivers/acpi/processor_idle.c:691
cpuidle_enter_state+0x541/0x10e0 drivers/cpuidle/cpuidle.c:237
cpuidle_enter+0x5f/0xa0 drivers/cpuidle/cpuidle.c:351
call_cpuidle kernel/sched/idle.c:155 [inline]
cpuidle_idle_call kernel/sched/idle.c:236 [inline]
do_idle+0x379/0x5e0 kernel/sched/idle.c:303
cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:400
rest_init+0x107/0x130 init/main.c:726
arch_call_rest_init+0xe/0x10 init/main.c:882
start_kernel+0x465/0x4d7 init/main.c:1140
x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:546
x86_64_start_kernel+0x9b/0xa0 arch/x86/kernel/head64.c:527
secondary_startup_64_no_verify+0xc4/0xcb
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:css_release+0xfb/0x100 kernel/cgroup/cgroup.c:5219
Code: b6 3d 05 bf 08 00 00 00 48 89 da e8 9f 5e e1 ff 5b 41 5e 41 5f 5d c3 e8 a3 32 08 00 48 c7 c7 00 33 0c 85 31 c0 e8 35 c2 44 03 <0f> 0b 0f 1f 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 18
RSP: 0018:ffffc90000007ba0 EFLAGS: 00010246
RAX: 000000000000003d RBX: ffff888117832c68 RCX: e6f6b9858a001200
RDX: 0000000000000101 RSI: 0000000000000101 RDI: 0000000000000000
RBP: ffffc90000007bb8 R08: ffffffff8157ac48 R09: ffffed103ee465d1
R10: ffffed103ee465d1 R11: 1ffff1103ee465d0 R12: ffff888117832c10
R13: ffff88811842fc00 R14: ffff888117832c01 R15: ffff888117832c18
FS: 0000000000000000(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2a75e05a28 CR3: 000000012112d000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 8b 1b mov (%rbx),%ebx
2: 48 89 de mov %rbx,%rsi
5: 48 83 e6 08 and $0x8,%rsi
9: 31 ff xor %edi,%edi
b: e8 42 b6 bd fc callq 0xfcbdb652
10: 48 83 e3 08 and $0x8,%rbx
14: 0f 85 ab 00 00 00 jne 0xc5
1a: eb 0c jmp 0x28
1c: e8 11 b1 bd fc callq 0xfcbdb132
21: 0f 00 2d 8a cb bc 00 verw 0xbccb8a(%rip) # 0xbccbb2
28: fb sti
29: f4 hlt
* 2a: fa cli <-- trapping instruction
2b: e9 a1 00 00 00 jmpq 0xd1
30: 49 83 c6 04 add $0x4,%r14
34: 4c 89 f0 mov %r14,%rax
37: 48 c1 e8 03 shr $0x3,%rax
3b: 42 8a 04 38 mov (%rax,%r15,1),%al
3f: 84 .byte 0x84
console output:
https://syzkaller.appspot.com/x/log.txt?x=16718e14f00000
patch:
https://syzkaller.appspot.com/x/patch.diff?x=116e3f6f700000