[dpdk-dev,2/4] net/enic: fix segfault when restarting with fdir filters

Message ID 20160929205639.1175-2-johndale@cisco.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

John Daley (johndale) Sept. 29, 2016, 8:56 p.m. UTC
When flow director filters where removed when an enic device is
stopped, the filters were freed but the pointer was not set to
NULL so the next stop would try to free them again.

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_clsf.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/net/enic/enic_clsf.c b/drivers/net/enic/enic_clsf.c
index b251b7f..111b194 100644
--- a/drivers/net/enic/enic_clsf.c
+++ b/drivers/net/enic/enic_clsf.c
@@ -240,6 +240,7 @@  void enic_clsf_destroy(struct enic *enic)
 			vnic_dev_classifier(enic->vdev, CLSF_DEL,
 				&key->fltr_id, NULL);
 			rte_free(key);
+			enic->fdir.nodes[index] = NULL;
 		}
 	}