Skip to contentSkip to conversation

drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref

DISCUSSION Ben Hutchings 2 participants 2 messages May 22, 2012 – Jun 11, 2012 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

I don't understand this change:

commit 41603e9783a24c8c7cce548c0819bdc9e46a585b

Author: Jesper Juhl <[email protected]>
Date:   Fri Mar 23 01:08:34 2012 +0100

drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref

amilo_rfkill_init() checks that dmi_first_match() does not return NULL, before registering the platform driver. So why would it return NULL when called by amilo_rfkill_probe()?

Ben.

Signature · 2 lines
Ben Hutchings
You can't have everything.  Where would you put it?
#1 lore raw
Quoted 12 lines · Ben Hutchings

I don't understand this change:

commit 41603e9783a24c8c7cce548c0819bdc9e46a585b

Author: Jesper Juhl <[email protected]>
Date:   Fri Mar 23 01:08:34 2012 +0100

drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref

amilo_rfkill_init() checks that dmi_first_match() does not return NULL, before registering the platform driver. So why would it return NULL when called by amilo_rfkill_probe()?

To be completely honest - I don't (currently) know.
When I did the patch I was convinced that it made sense and that I could prove that - now I can't. So I must either have been drunk or delusional at the time...

Seriously; I really don't know. I remember crafting the patch after reading some coverity reports and reading the source and thinking "this makes sense"... Now, when I read it again, it does not..

Signature · 3 lines
Jesper Juhl <[email protected]>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.