Commit e8bdb3c8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents f868cd25 57f7c7dc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1393,8 +1393,9 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
			goto out_unregister;

		cpu = get_cpu();

		ret = pmu_sbi_snapshot_setup(pmu, cpu);
		put_cpu();

		if (ret) {
			/* Snapshot is an optional feature. Continue if not available */
			pmu_sbi_snapshot_free(pmu);
@@ -1408,7 +1409,6 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
			 */
			static_branch_enable(&sbi_pmu_snapshot_available);
		}
		put_cpu();
	}

	register_sysctl("kernel", sbi_pmu_sysctl_table);