RE: [PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR interrupt handler
From: Ghannam, Yazen
Date: Thu Aug 09 2018 - 14:18:26 EST
> -----Original Message-----
> From: Borislav Petkov <bp@xxxxxxxxx>
> Sent: Thursday, August 9, 2018 11:16 AM
> To: Ghannam, Yazen <Yazen.Ghannam@xxxxxxx>
> Cc: linux-edac@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> tony.luck@xxxxxxxxx; x86@xxxxxxxxxx
> Subject: Re: [PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR
> interrupt handler
>
> On Thu, Aug 09, 2018 at 09:08:33AM -0500, Yazen Ghannam wrote:
> > From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> >
> > If threshold_init_device() fails then per_cpu(threshold_banks) will be
> > deallocated. The thresholding interrupt handler will still be active, so
>
> So fix the code so that *that* doesn't happen instead of adding checks
> to the interrupt handler.
>
> I.e.,
>
> if (err) {
> mce_threshold_vector = default_threshold_interrupt;
> return err;
> }
>
Okay. I'll make that change.
Thanks,
Yazen