Re: [PATCH 1/2] sysdev: Do not register with sysdev when erroring on add

From: Brian Gerst
Date: Sun Jun 05 2011 - 07:07:42 EST


On Tue, Feb 1, 2011 at 11:19 AM, Borislav Petkov <bp@xxxxxxxxx> wrote:
> From: Borislav Petkov <borislav.petkov@xxxxxxx>
>
> When encountering an error while executing the driver's ->add method, we
> should cancel registration and unwind what we've regged so far. The low
> level ->add methods do return proper error codes but those aren't looked
> at in sysdev_driver_register(). Fix that by sharing the unregistering
> code.

This patch is causing boot failures on a virtual machine running
Fedora 15 32-bit. With this patch, the microcode driver repeatedly
spews:
microcode: CPU0: AMD CPU family 0x6 not supported
modprobe: FATAL: Error inserting microcode: Invalid argument.
until eventually causing an oops. Reverting this patch allows the
boot to proceed.

/proc/cpuinfo:
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 0.13.0
stepping : 3
cpu MHz : 2809.416
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 clflush mmx fxsr sse sse2 syscall nx lm pni cx16 popcnt
hypervisor lahf_lm abm sse4a
bogomips : 5618.83
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:

--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/