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:
1022cb6
)
i40e: don't free nonexistent rings
author
Mitch Williams
<
[email protected]
>
Sat, 28 Sep 2013 07:13:13 +0000
(07:13 +0000)
committer
Jeff Kirsher
<
[email protected]
>
Tue, 22 Oct 2013 12:33:43 +0000
(
05:33
-0700)
Not all VSIs have rings! Check to see if rings were actually allocated before
freeing them.
This prevents a panic when tx_rings[0] is not allocated.
Signed-off-by: Mitch Williams <
[email protected]
>
Signed-off-by: Jesse Brandeburg <
[email protected]
>
Tested-by: Sibai Li <
[email protected]
>
Signed-off-by: Jeff Kirsher <
[email protected]
>
drivers/net/ethernet/intel/i40e/i40e_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/i40e/i40e_main.c
b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 69ed8014afbd78c699fc513cfeea9453449e7520..a8c18faf1c5448275ba31f278ef78e96b30e5acf 100644
(file)
--- a/
drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/
drivers/net/ethernet/intel/i40e/i40e_main.c
@@
-5160,11
+5160,12
@@
static s32 i40e_vsi_clear_rings(struct i40e_vsi *vsi)
{
int i;
- for (i = 0; i < vsi->alloc_queue_pairs; i++) {
- kfree_rcu(vsi->tx_rings[i], rcu);
- vsi->tx_rings[i] = NULL;
- vsi->rx_rings[i] = NULL;
- }
+ if (vsi->tx_rings[0])
+ for (i = 0; i < vsi->alloc_queue_pairs; i++) {
+ kfree_rcu(vsi->tx_rings[i], rcu);
+ vsi->tx_rings[i] = NULL;
+ vsi->rx_rings[i] = NULL;
+ }
return 0;
}