Commit 2840dad
drivers: perf: Fix smp_processor_id() use in preemptible code
As reported in [1], the use of smp_processor_id() in
pmu_sbi_device_probe() must be protected by disabling the preemption, so
simple use get_cpu()/put_cpu() instead.
Reported-by: Nam Cao <[email protected]>
Closes: https://lore.kernel.org/linux-riscv/[email protected]/ [1]
Signed-off-by: Alexandre Ghiti <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Tested-by: Nam Cao <[email protected]>
Fixes: a862521 ("drivers/perf: riscv: Implement SBI PMU snapshot function")
Reported-by: Andrea Parri <[email protected]>
Tested-by: Andrea Parri <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>1 parent 1ff95eb commit 2840dad
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
| 1376 | + | |
| 1377 | + | |
1376 | 1378 | | |
1377 | 1379 | | |
1378 | 1380 | | |
1379 | 1381 | | |
1380 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1381 | 1385 | | |
1382 | 1386 | | |
1383 | 1387 | | |
| |||
1391 | 1395 | | |
1392 | 1396 | | |
1393 | 1397 | | |
| 1398 | + | |
1394 | 1399 | | |
1395 | 1400 | | |
1396 | 1401 | | |
| |||
0 commit comments