projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21a4476
)
bnx2x: Prevent null pointer dereference on SKB release
author
Yuval Mintz
<
[email protected]
>
Mon, 10 Aug 2015 09:49:35 +0000
(12:49 +0300)
committer
David S. Miller
<
[email protected]
>
Mon, 10 Aug 2015 21:31:58 +0000
(14:31 -0700)
On error flows its possible to free an SKB even if it was not allocated.
Signed-off-by: Yuval Mintz <
[email protected]
>
Signed-off-by: Ariel Elior <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index a90d7364334f9dfa3687dc813e068508a342861c..f7fbdc9d132511b72df0db2ce0b92e4df0774c44 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@
-262,9
+262,9
@@
static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
if (likely(skb)) {
(*pkts_compl)++;
(*bytes_compl) += skb->len;
+ dev_kfree_skb_any(skb);
}
- dev_kfree_skb_any(skb);
tx_buf->first_bd = 0;
tx_buf->skb = NULL;