Re: [PATCH] Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.



On Sat, 2 Dec 2006 00:21:56 +0100
Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:

pci_get_slot() may return NULL if nothing was found.
quirk_nvidia_ck804() does not check the value returned from pci_get_slot(),
so it may end up causing a NULL pointer deref.


Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>

I don't think its a physically possible case but it does no harm and
it'll kill boot if it happens

Acked-by: Alan Cox <alan@xxxxxxxxxx>
-
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/



Relevant Pages

  • Re: [PATCH] Be a bit defensive in quirk_nvidia_ck804() so we dont risk dereferencing a NULL pdev.
    ... On Sat, 2 Dec 2006, Jesper Juhl wrote: ... so it may end up causing a NULL pointer deref. ... * a single one having MSI is enough to be sure that MSI are supported. ...
    (Linux-Kernel)
  • Re: Endeavour or Endeavor?
    ... exemption (likely to cause harm, unnecessary, and actually causing ... I usually stay out of the pet peeve contests in AUE, ... man in falsely shouting fire in a theatre and causing a panic. ... does not even protect a man from an injunction against uttering ...
    (alt.usage.english)
  • Re: Serial related oops
    ... We inserted 37 printk's in the function body, ... there's still little clue about why this is causing a NULL pointer ... and which results in it doing a NULL pointer deref. ... In a kernel without instrumentation I get problems within a 1 day period. ...
    (Linux-Kernel)
  • Re: Another sign of the times
    ... I can't remember it causing me any harm, even using a dirty finger when ... Remember going into the garden pulling a carrot, ... grandpa's trousers were the start of me preferring raw vegetables. ...
    (uk.people.silversurfers)
  • Re: Green light to anarchy: Eco-activists cleared of power station damage after using climate ch
    ... brick, which would be extremely difficult if you are a motorist ... causing more harm than me by driving to my house. ... "Only if you can show that I am causing a greater harm than your ...
    (uk.transport)