diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-06-21 20:34:09 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:18:58 -0400 |
commit | 31cd921dea3274202399078443dc6e93ca3f84c1 (patch) | |
tree | 70dd0ba8a6b94366f0345e2d0b470014274cd8b6 /drivers/staging/wlags49_h2 | |
parent | 7873311aed5436bad100ff7ed98f159e6c8c17a7 (diff) | |
download | linux-stable-31cd921dea3274202399078443dc6e93ca3f84c1.tar.gz linux-stable-31cd921dea3274202399078443dc6e93ca3f84c1.tar.bz2 linux-stable-31cd921dea3274202399078443dc6e93ca3f84c1.zip |
staging: wlags49_h2: Fix use of skb after netif_rx
This patch moves a call to netif_rx(skb) after a subsequent reference to
skb, because netif_rx may call kfree_skb via enqueue_to_backlog on its
argument.
This was found using the following semantic match.
// <smpl>
@@
expression skb, e,e1;
@@
(
netif_rx(skb);
|
netif_rx_ni(skb);
)
... when != skb = e
(
skb = e1
|
* skb
)
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_netdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index a10d014365f2..60701d4325d0 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -888,8 +888,6 @@ int wl_rx(struct net_device *dev) GET_PACKET(skb->dev, skb, pktlen); if (status == HCF_SUCCESS) { - netif_rx(skb); - if (port == 0) { lp->stats.rx_packets++; lp->stats.rx_bytes += pktlen; @@ -918,6 +916,7 @@ int wl_rx(struct net_device *dev) } #endif /* WIRELESS_SPY */ #endif /* WIRELESS_EXT */ + netif_rx(skb); } else { DBG_ERROR(DbgInfo, "Rx request to card FAILED\n"); |