net/sched: cls_flower: add missing unbind call when destroying flows
authorRoi Dayan <roid@mellanox.com>
Tue, 1 Nov 2016 14:08:28 +0000 (16:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Nov 2016 19:00:47 +0000 (15:00 -0400)
tcf_unbind was called in fl_delete but was missing in fl_destroy when
force deleting flows.

Fixes: 77b9900ef53a ('tc: introduce Flower classifier')
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_flower.c

index f6f40fba599bad3d1db4bb14fcc4f7d663d128bc..a5f637011f9f6101043ccb5373b8e7152a52ae1e 100644 (file)
@@ -280,6 +280,7 @@ static bool fl_destroy(struct tcf_proto *tp, bool force)
        list_for_each_entry_safe(f, next, &head->filters, list) {
                fl_hw_destroy_filter(tp, (unsigned long)f);
                list_del_rcu(&f->list);
+               tcf_unbind_filter(tp, &f->res);
                call_rcu(&f->rcu, fl_destroy_filter);
        }
        RCU_INIT_POINTER(tp->root, NULL);