Fix stray pointer in e100
PATCH 1/1 Fix stray pointer in e100
e100_alloc_cbs() allocates the cb's but does not set cb->skb = NULL which means that the following check in e100_tx_clean() will execute even though cb->skb is not really a valid pointer an we OOPs:
if(likely(cb->skb != NULL)) {
...
nic->net_stats.tx_bytes += cb->skb->len;
}Attached patch fixes the issue.
~Deepak
Signature · 1 line
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/
drivers/net/e100.c +1 -0
@@ -1346,6 +1346,7 @@ cb->dma_addr = nic->cbs_dma_addr + i *sizeof (struct cb ); cb->link =cpu_to_le32 (nic->cbs_dma_addr + ((i+1 ) % count) *sizeof (struct cb )); + cb->skb =NULL ; } nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = nic->cbs;