Skip to contentSkip to conversation

pcnet32: remove incorrect pcnet32_free_ring

PATCH Applied Don Fry 2 participants 2 messages May 25, 2006 – May 27, 2006

Subsystems (2)
lore
Share & tools
lore

Don Fry

author
#0 lore raw

PATCH 1/1 pcnet32: remove incorrect pcnet32_free_ring

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.

drivers/net/pcnet32.c renamed from drivers/net/orig.pcnet32.c +0 -2
@@ -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
Signature · 2 lines
Don Fry
[email protected]
Applied
#1 lore raw
Quoted 9 lines · Don Fry

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.

applied