Skip to content

Commit e8bdb3c

Browse files
committed
Merge tag 'riscv-for-linus-6.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fix from Palmer Dabbelt: - A fix for the CPU perf driver that avoids leaking CPU ID references on systems without snapshot support. * tag 'riscv-for-linus-6.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: drivers: perf: Fix wrong put_cpu() placement
2 parents f868cd2 + 57f7c7d commit e8bdb3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/perf/riscv_pmu_sbi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,9 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
13931393
goto out_unregister;
13941394

13951395
cpu = get_cpu();
1396-
13971396
ret = pmu_sbi_snapshot_setup(pmu, cpu);
1397+
put_cpu();
1398+
13981399
if (ret) {
13991400
/* Snapshot is an optional feature. Continue if not available */
14001401
pmu_sbi_snapshot_free(pmu);
@@ -1408,7 +1409,6 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
14081409
*/
14091410
static_branch_enable(&sbi_pmu_snapshot_available);
14101411
}
1411-
put_cpu();
14121412
}
14131413

14141414
register_sysctl("kernel", sbi_pmu_sysctl_table);

0 commit comments

Comments
 (0)