net/enic: fix crash with removed flow director filters
authorJohn Daley <johndale@cisco.com>
Thu, 29 Sep 2016 20:56:37 +0000 (13:56 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Thu, 13 Oct 2016 13:30:59 +0000 (15:30 +0200)
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

index b251b7f..111b194 100644 (file)
@@ -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;
                }
        }