mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'perf_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Borislav Petkov: - Prevent perf_sigtrap() from observing an exiting task and warning about it * tag 'perf_urgent_for_v6.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix WARN in perf_sigtrap()
This commit is contained in:
@@ -7203,6 +7203,13 @@ void perf_event_wakeup(struct perf_event *event)
|
||||
|
||||
static void perf_sigtrap(struct perf_event *event)
|
||||
{
|
||||
/*
|
||||
* Both perf_pending_task() and perf_pending_irq() can race with the
|
||||
* task exiting.
|
||||
*/
|
||||
if (current->flags & PF_EXITING)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We'd expect this to only occur if the irq_work is delayed and either
|
||||
* ctx->task or current has changed in the meantime. This can be the
|
||||
@@ -7211,13 +7218,6 @@ static void perf_sigtrap(struct perf_event *event)
|
||||
if (WARN_ON_ONCE(event->ctx->task != current))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Both perf_pending_task() and perf_pending_irq() can race with the
|
||||
* task exiting.
|
||||
*/
|
||||
if (current->flags & PF_EXITING)
|
||||
return;
|
||||
|
||||
send_sig_perf((void __user *)event->pending_addr,
|
||||
event->orig_type, event->attr.sig_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user