lkml.org 
[lkml]   [2014]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] EDAC, MCE, AMD: Fix code to prevent NULL dereference
On Mon, Feb 17, 2014 at 01:26:20PM -0600, Aravind Gopalakrishnan wrote:
> > if (c->x86_vendor != X86_VENDOR_AMD)
> >- return 0;
> >+ return -ENODEV;
> > if (c->x86 < 0xf || c->x86 > 0x16)
> >- return 0;
> >+ return -ENODEV;
> Ah. you are right. (I had tested against different family/model
> checks that happen to throw NULL dereference)
> You can ignore the patch.
>
> Apologies for the trouble.

But we still need a fix, I guess the one I sent you does the job, yes,
no?

If not, I'd need more background info though - you're loading this on an
unsupported family, right?

If so, we need to fix the family check at the beginning:

if (c->x86 < 0xf || c->x86 > 0x16)

maybe even look at c->x86_model if we have to.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2014-02-17 22:10    [W:0.070 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site