[perf] odd fuzzer generated trace in intel_pmu_lbr_restore

From: Vince Weaver
Date: Wed Jul 06 2022 - 17:15:07 EST


Hello

Let the fuzzer running a long time on 5.19-rc1 and after a few weeks it
triggered this weird trace. It is repeatable (although I haven't
narrowed down exactly what's causing it).

It's odd in that it just dumps a <TASK>, it doesn't provide any info on
what the actual trigger is.

This is on a Haswell machine.

[2611569.407088] Call Trace:
[2611569.407092] <TASK>
[2611569.407093] intel_pmu_lbr_restore+0x9a/0x1f0
[2611569.407100] intel_pmu_lbr_sched_task+0x91/0x1c0
[2611569.407103] __perf_event_task_sched_in+0x1cd/0x240
[2611569.407107] ? __perf_event_task_sched_out+0x75/0x5c0
[2611569.407109] finish_task_switch.isra.0+0x188/0x2a0
[2611569.407114] ? __switch_to+0x112/0x430
[2611569.407119] __schedule+0x2cf/0x10d0
[2611569.407123] ? __sysvec_irq_work+0x5b/0xc0
[2611569.407127] schedule+0x4e/0xb0
[2611569.407129] schedule_timeout+0x115/0x150
[2611569.407132] ? schedule_timeout+0x115/0x150
[2611569.407135] ? _raw_spin_unlock_irqrestore+0x23/0x40
[2611569.407138] ? preempt_count_add+0x68/0xa0
[2611569.407141] ? preempt_count_add+0x68/0xa0
[2611569.407144] __wait_for_common+0x93/0x1a0
[2611569.407146] ? usleep_range_state+0x90/0x90
[2611569.407149] __wait_rcu_gp+0x112/0x120
[2611569.407152] synchronize_rcu+0xc8/0xe0
[2611569.407156] ? note_gp_changes+0x80/0x80
[2611569.407159] perf_trace_event_unreg.isra.0+0x37/0x90
[2611569.407163] perf_trace_destroy+0x38/0x50
[2611569.407165] _free_event+0xf9/0x3d0
[2611569.407167] perf_event_release_kernel+0x279/0x2d0
[2611569.407170] perf_release+0x11/0x20
[2611569.407172] __fput+0x8c/0x240
[2611569.407175] task_work_run+0x5c/0x90
[2611569.407180] exit_to_user_mode_prepare+0x125/0x130
[2611569.407183] syscall_exit_to_user_mode+0x22/0x40
[2611569.407185] ? __x64_sys_close+0xd/0x40
[2611569.407189] do_syscall_64+0x48/0xc0
[2611569.407193] entry_SYSCALL_64_after_hwframe+0x46/0xb0
[2611569.407198] RIP: 0033:0x7f92e4813cc3
[2611569.407200] Code: e9 37 ff ff ff e8 ad ef 01 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8
[2611569.407202] RSP: 002b:00007fffc243bb98 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
[2611569.407205] RAX: 0000000000000000 RBX: 000000000000000c RCX: 00007f92e4813cc3
[2611569.407207] RDX: 0000000000005be0 RSI: 00007fffc243bb74 RDI: 0000000000000048
[2611569.407208] RBP: 00007fffc243bbc0 R08: 00007f92e48f7234 R09: 00007f92e48f7240
[2611569.407209] R10: 0000000000000000 R11: 0000000000000246 R12: 000056355ea124f0
[2611569.407210] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[2611569.407212] </TASK>