netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.17-rc5] pcnet32:  remove incorrect pcnet32_free_ring
@ 2006-05-25 23:22 Don Fry
  2006-05-27  1:33 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Don Fry @ 2006-05-25 23:22 UTC (permalink / raw)
  To: tsbogend, jgarzik, netdev

During a code scan for another change I discovered that this call to
pcnet32_free_ring must be removed.  If the open fails due to a lack of
memory all the ring structures are removed via the call to free_ring
and a subsequent call to open will dereference a null pointer in
pcnet32_init_ring.

Please apply to 2.6.17.

Signed-off-by:  Don Fry <brazilnut@us.ibm.com>

--- linux-2.6.17-rc5/drivers/net/orig.pcnet32.c	2006-05-25 15:59:12.000000000 -0700
+++ linux-2.6.17-rc5/drivers/net/pcnet32.c	2006-05-25 16:09:40.000000000 -0700
@@ -1774,8 +1774,6 @@ static int pcnet32_open(struct net_devic
 		lp->rx_dma_addr[i] = 0;
 	}
 
-	pcnet32_free_ring(dev);
-
 	/*
 	 * Switch back to 16bit mode to avoid problems with dumb
 	 * DOS packet driver after a warm reboot

-- 
Don Fry
brazilnut@us.ibm.com

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

* Re: [PATCH 2.6.17-rc5] pcnet32:  remove incorrect pcnet32_free_ring
  2006-05-25 23:22 [PATCH 2.6.17-rc5] pcnet32: remove incorrect pcnet32_free_ring Don Fry
@ 2006-05-27  1:33 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-05-27  1:33 UTC (permalink / raw)
  To: Don Fry; +Cc: tsbogend, netdev

Don Fry wrote:
> During a code scan for another change I discovered that this call to
> pcnet32_free_ring must be removed.  If the open fails due to a lack of
> memory all the ring structures are removed via the call to free_ring
> and a subsequent call to open will dereference a null pointer in
> pcnet32_init_ring.
> 
> Please apply to 2.6.17.
> 
> Signed-off-by:  Don Fry <brazilnut@us.ibm.com>

applied



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

end of thread, other threads:[~2006-05-27  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25 23:22 [PATCH 2.6.17-rc5] pcnet32: remove incorrect pcnet32_free_ring Don Fry
2006-05-27  1:33 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).