mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
perf: marvell: Cancel CN10K DDR PMU hrtimer on device remove
cn10k_ddr_perf_remove() did not cancel the poll hrtimer before returning. If the device was unbound while perf events were still active the timer callback could run post-free. To fix the issue by adding hrtimer_cancel() in remove(). Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
9b551a2446
commit
7dbcb0268d
|
|
@ -1284,6 +1284,12 @@ static void cn10k_ddr_perf_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct cn10k_ddr_pmu *ddr_pmu = platform_get_drvdata(pdev);
|
||||
|
||||
/*
|
||||
* Cancel the poll timer before further teardown so the handler
|
||||
* cannot run after this function returns.
|
||||
*/
|
||||
hrtimer_cancel(&ddr_pmu->hrtimer);
|
||||
|
||||
cpuhp_state_remove_instance_nocalls(
|
||||
CPUHP_AP_PERF_ARM_MARVELL_CN10K_DDR_ONLINE,
|
||||
&ddr_pmu->node);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user