Commit 69169351 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Jeff Garzik

[PATCH] Fwd: Re: Atmel - possible SKB leak?

Jeff,

Atmel driver in 2.6.0-test11 is leaking SKBs if card gets disassociated
from an AP when it's about to transfer packet. Simon (atmel maintainer)
is OK with the patch. Given the fact that we are leaking memory I think
it may be beneficial to push it to Linus (if you like the patch).

Dmitry

===================================================================


ChangeSet@1.1517, 2003-12-11 01:44:56-05:00, dtor_core@ameritech.net
  NET: atmel - do not leak SKBs when dropping packets


 atmel.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


===================================================================
parent a5b02872
......@@ -748,13 +748,13 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev)
if(priv->station_state != STATION_STATE_READY) {
priv->stats.tx_errors++;
return 0;
goto done;
}
if (priv->card && priv->present_callback &&
!(*priv->present_callback)(priv->card)) {
priv->stats.tx_errors++;
return 0;
goto done;
}
/* first ensure the timer func cannot run */
......@@ -804,6 +804,8 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev)
spin_unlock_irqrestore(&priv->irqlock, flags);
spin_unlock_bh(&priv->timerlock);
done:
dev_kfree_skb(skb);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment