linux/drivers/platform
Jesper Juhl 41603e9783 drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref
In drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() the call
to dmi_first_match() may fail and return NULL. If it does return NULL,
then we'll be dereferencing a NULL pointer in the rfkill_alloc() call
where we do 'system_id->driver_data' --> KABOOM!

Avoid that problem by testing for a NULL return value from
dmi_first_match() and bailing out if it fails.

I was a bit uncertain about what to return in the failure case. In the
end I settled for -ENXIO as the most logical error to return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-03-26 15:45:32 -04:00
..
x86 drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref 2012-03-26 15:45:32 -04:00
Kconfig Kconfig: Remove useless and sometimes wrong comments 2009-11-09 09:40:56 +01:00
Makefile