Skip to content

Commit 7cecb47

Browse files
bwhacksrafaeljw
authored andcommitted
ACPI / extlog: Check for RDMSR failure
extlog_init() uses rdmsrl() to read an MSR, which on older CPUs provokes a error message at boot: unchecked MSR access error: RDMSR from 0x179 at rIP: 0xcd047307 (native_read_msr+0x7/0x40) Use rdmsrl_safe() instead, and return -ENODEV if it fails. Reported-by: jim@photojim.ca References: https://bugs.debian.org/971058 Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent a1b8638 commit 7cecb47

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/acpi/acpi_extlog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ static int __init extlog_init(void)
222222
u64 cap;
223223
int rc;
224224

225-
rdmsrl(MSR_IA32_MCG_CAP, cap);
226-
227-
if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr())
225+
if (rdmsrl_safe(MSR_IA32_MCG_CAP, &cap) ||
226+
!(cap & MCG_ELOG_P) ||
227+
!extlog_get_l1addr())
228228
return -ENODEV;
229229

230230
rc = -EINVAL;

0 commit comments

Comments
 (0)