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:
7f50236
)
bnx2x: fix possible panic under memory stress
author
Eric Dumazet
<
[email protected]
>
Thu, 26 Jun 2014 07:44:02 +0000
(
00:44
-0700)
committer
David S. Miller
<
[email protected]
>
Tue, 1 Jul 2014 19:20:20 +0000
(12:20 -0700)
While it is legal to kfree(NULL), it is not wise to use :
put_page(virt_to_head_page(NULL))
BUG: unable to handle kernel paging request at
ffffeba400000000
IP: [<
ffffffffc01f5928
>] virt_to_head_page+0x36/0x44 [bnx2x]
Reported-by: Michel Lespinasse <
[email protected]
>
Signed-off-by: Eric Dumazet <
[email protected]
>
Cc: Ariel Elior <
[email protected]
>
Fixes: d46d132cc021 ("bnx2x: use netdev_alloc_frag()")
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 47c5814114e1764145f18c9c2088e8395214602e..4b875da1c7ed2afc0eec3854217b4919797f3e20 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@
-797,7
+797,8
@@
static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
return;
}
- bnx2x_frag_free(fp, new_data);
+ if (new_data)
+ bnx2x_frag_free(fp, new_data);
drop:
/* drop the packet and keep the buffer in the bin */
DP(NETIF_MSG_RX_STATUS,