mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: - eepro100-avoid-potential-null-pointer-deref-in-speedo_init_rx_ring.patch removed from -mm tree
       [not found] <200709290551.l8T5ppNg002621@imap1.linux-foundation.org>
@ 2007-10-01 20:54 ` Kok, Auke
  2007-10-02  8:12   ` Jesper Juhl
  0 siblings, 1 reply; 2+ messages in thread
From: Kok, Auke @ 2007-10-01 20:54 UTC (permalink / raw)
  To: jesper.juhl; +Cc: linux-kernel, Andrew Morton

akpm@linux-foundation.org wrote:
> The patch titled
>      eepro100: Avoid potential NULL pointer deref in speedo_init_rx_ring()
> has been removed from the -mm tree.  Its filename was
>      eepro100-avoid-potential-null-pointer-deref-in-speedo_init_rx_ring.patch
> 
> This patch was dropped because an updated version will be merged
> 
> ------------------------------------------------------
> Subject: eepro100: Avoid potential NULL pointer deref in speedo_init_rx_ring()
> From: Jesper Juhl <jesper.juhl@gmail.com>
> 
> In a low memory situation, if you are very unlucky, the speedo_init_rx_ring()
> function may cause a NULL pointer deref.
> 
> The problem is in the case where we can't allocate even a single skb for
> the RX ring.  In this case 'last_rxf' will be NULL when we break out of
> the loop and the line
>     last_rxf->status = cpu_to_le32(0xC0000002);	/* '2' is flag value only. */
> will cause a NULL pointer dereference.
> 
> To fix this properly we need to be return an error from speedo_init_rx_ring()
> and have the caller (speedo_open()) catch and propagate the error, as well as
> undo anything done to setup the device so far.
> 
> This patch adds a check to catch the unlucky case of not even a single skb
> being available and adds code in the caller to catch the error and release the
> device properly.
> 
> For a user who hits this problem, this makes the difference between her device
> not being opened and a kernel crash.  Clearly a non functional NIC if
> preferable to a kernel crash - especially since setting up the device can
> easily be retried later after freeing up some memory; a kernel crash is not as
> easy to recover from.
> 
> The problem was initially spotted by the Coverity checker.
> 
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>


is this actually a problem? everybody should be running e100. I'm surprised to see
a patch for eepro100, just before it gets removed...

Auke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: - eepro100-avoid-potential-null-pointer-deref-in-speedo_init_rx_ring.patch removed from -mm tree
  2007-10-01 20:54 ` - eepro100-avoid-potential-null-pointer-deref-in-speedo_init_rx_ring.patch removed from -mm tree Kok, Auke
@ 2007-10-02  8:12   ` Jesper Juhl
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Juhl @ 2007-10-02  8:12 UTC (permalink / raw)
  To: Kok, Auke; +Cc: linux-kernel, Andrew Morton

On 01/10/2007, Kok, Auke <auke-jan.h.kok@intel.com> wrote:
...
>
> is this actually a problem? everybody should be running e100. I'm surprised to see
> a patch for eepro100, just before it gets removed...
>
The patch is actually about a year old, it just never got merged. And
IMHO, as long as the driver is in the tree it makes sense to apply
fixes to it.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-02  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200709290551.l8T5ppNg002621@imap1.linux-foundation.org>
2007-10-01 20:54 ` - eepro100-avoid-potential-null-pointer-deref-in-speedo_init_rx_ring.patch removed from -mm tree Kok, Auke
2007-10-02  8:12   ` Jesper Juhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome