diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-01-19 14:19:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-20 02:58:08 +0100 |
commit | f4895b8bc83a22a36446c4aee277e1750fcc6a18 (patch) | |
tree | e1c340f625af67069b23d693bde9e4ddb9da7ce6 /drivers/net/wimax/i2400m/control.c | |
parent | mv643xx_eth: prevent interrupt storm on ifconfig down (diff) | |
download | linux-f4895b8bc83a22a36446c4aee277e1750fcc6a18.tar.xz linux-f4895b8bc83a22a36446c4aee277e1750fcc6a18.zip |
wimax/i2400m: error paths that need to free an skb should use kfree_skb()
Roel Kluin reported a bug in two error paths where skbs were wrongly
being freed using kfree(). He provided a fix where it was replaced to
kfree_skb(), as it should be.
However, in i2400mu_rx(), the error path was missing returning an
indication of the failure. Changed to reset rx_skb to NULL and return
it to the caller, i2400mu_rxd(). It will be treated as a transient
error and just ignore the packet.
Depending on the buffering conditions inside the device, the data
packet might be dropped or the device will signal the host again for
data-ready-to-read and the host will retry.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wimax/i2400m/control.c')
-rw-r--r-- | drivers/net/wimax/i2400m/control.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index d3d37fed6893..15d9f51b292c 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c @@ -609,7 +609,7 @@ void i2400m_msg_to_dev_cancel_wait(struct i2400m *i2400m, int code) spin_lock_irqsave(&i2400m->rx_lock, flags); ack_skb = i2400m->ack_skb; if (ack_skb && !IS_ERR(ack_skb)) - kfree(ack_skb); + kfree_skb(ack_skb); i2400m->ack_skb = ERR_PTR(code); spin_unlock_irqrestore(&i2400m->rx_lock, flags); } |