Re: [PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR interrupt handler

2018-08-21 Thread Borislav Petkov
On Thu, Aug 16, 2018 at 07:00:43PM +, Ghannam, Yazen wrote: > So I think we should keep the NULL pointer checks for now to keep this fix > small. I can make a new patch following your suggestion above. > > We can change the code so that we create the data structures during the > earlier init p

RE: [PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR interrupt handler

2018-08-16 Thread Ghannam, Yazen
el@vger.kernel.org; > > tony.l...@intel.com; x...@kernel.org > > 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 > &

RE: [PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR interrupt handler

2018-08-09 Thread Ghannam, Yazen
> -Original Message- > From: Borislav Petkov > Sent: Thursday, August 9, 2018 11:16 AM > To: Ghannam, Yazen > Cc: linux-e...@vger.kernel.org; linux-kernel@vger.kernel.org; > tony.l...@intel.com; x...@kernel.org > Subject: Re: [PATCH 1/2] x86/MCE/AMD: Check

Re: [PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR interrupt handler

2018-08-09 Thread Borislav Petkov
On Thu, Aug 09, 2018 at 09:08:33AM -0500, Yazen Ghannam wrote: > From: Yazen Ghannam > > 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 addi

[PATCH 1/2] x86/MCE/AMD: Check for NULL banks in THR interrupt handler

2018-08-09 Thread Yazen Ghannam
From: Yazen Ghannam If threshold_init_device() fails then per_cpu(threshold_banks) will be deallocated. The thresholding interrupt handler will still be active, so it's possible to get a NULL pointer dereference if a THR interrupt happens and any of the structures are NULL. Exit the handler if p