Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d1e9bf5 authored by Borislav Petkov's avatar Borislav Petkov
Browse files

EDAC, mce_amd_inj: Move bit preparations before the injection



We do get_online_cpus() and then start noodling with the bits. Do that
*before* we grab the hotplug lock.

Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent f2f3dca1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -196,16 +196,16 @@ static void do_inject(void)
		return;
	}

	get_online_cpus();
	if (!cpu_online(cpu))
		goto err;

	/* prep MCE global settings for the injection */
	mcg_status = MCG_STATUS_MCIP | MCG_STATUS_EIPV;

	if (!(i_mce.status & MCI_STATUS_PCC))
		mcg_status |= MCG_STATUS_RIPV;

	get_online_cpus();
	if (!cpu_online(cpu))
		goto err;

	toggle_hw_mce_inject(cpu, true);

	wrmsr_on_cpu(cpu, MSR_IA32_MCG_STATUS,