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 2/17/2014 12:27 PM, Borislav Petkov wrote:
> On Mon, Feb 17, 2014 at 11:49:51AM -0600, Aravind Gopalakrishnan wrote:
>> If MCE decoding support does not exist for a particular family/model,
>> and if one tries to inject errors using mce_amd_inj module, it leads
>> to kernel OOPS. Especially if we inject errors to MC0, MC1, MC2 banks.
> Well, we shouldn't even be loading the module on unsupported hw, i.e.,
> something like that:
>
>
> 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.

-Aravind.



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