Skip to content

Commit 3a535ae

Browse files
Hannibal404brenns10
authored andcommitted
Fix cpuinfo crash on OL8 RHCK
Signed-off-by: Pradyumn Rahar <[email protected]>
1 parent c9c47c5 commit 3a535ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drgn_tools/cpuinfo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ def get_spectre_v2_mitigation(prog: Program, cpu_caps_bugs: Object) -> str:
309309
if test_bit(X86_FEATURE_RSB_CTXSW, cpu_caps_bugs):
310310
mitigation += ", RSB filling"
311311

312-
if prog["spectre_v2_bad_module"]:
312+
if (
313+
"spectre_v2_bad_module" in prog
314+
and prog["spectre_v2_bad_module"]
315+
):
313316
mitigation += " - vulnerable module loaded"
314317

315318
return mitigation

0 commit comments

Comments
 (0)