]> git.baikalelectronics.ru Git - kernel.git/commit
wimax/i2400m: error paths that need to free an skb should use kfree_skb()
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Mon, 19 Jan 2009 13:19:30 +0000 (13:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jan 2009 01:58:08 +0000 (17:58 -0800)
commit29b8ffa7e3a19bfe169783fad264719ca76b8bc3
treee1c340f625af67069b23d693bde9e4ddb9da7ce6
parent9679ce8fa931f4dd9bab356d7cb2423666b1ed6c
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>
drivers/net/wimax/i2400m/control.c
drivers/net/wimax/i2400m/usb-rx.c