Re: [PATCH -fixes v2] drivers: perf: Fix smp_processor_id() use in preemptible code
From: Nam Cao
Date: Thu Sep 05 2024 - 17:56:04 EST
On Thu, Aug 29, 2024 at 11:00:34AM +0200, Alexandre Ghiti wrote:
> As reported in [1], the use of smp_processor_id() in
> pmu_sbi_device_probe() must be protected by disabling the preemption, so
> simply use get_cpu()/put_cpu() instead.
>
> Reported-by: Andrea Parri <parri.andrea@xxxxxxxxx>
> Reported-by: Nam Cao <namcao@xxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/linux-riscv/20240820074925.ReMKUPP3@xxxxxxxxxxxxx/ [1]
> Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Tested-by: Nam Cao <namcao@xxxxxxxxxxxxx>
Best regards,
Nam