diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 3822666fb73d5..1467c6d1a9667 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -413,6 +414,9 @@ static int msr_build_context(const u32 *msr_id, const int num) return -ENOMEM; } + /* The pointer is going to be stored in static struct (saved_context) */ + kmemleak_not_leak(msr_array); + if (saved_msrs->array) { /* * Multiple callbacks can invoke this function, so copy any