On Mon, Feb 17, 2014 at 11:49:51AM -0600, Aravind Gopalakrishnan wrote:Ah. you are right. (I had tested against different family/model checks that happen to throw NULL dereference)
If MCE decoding support does not exist for a particular family/model,Well, we shouldn't even be loading the module on unsupported hw, i.e.,
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.
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;