net/sched: fix filter flushing
authorJiri Pirko <jiri@mellanox.com>
Sat, 20 May 2017 13:01:32 +0000 (15:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 May 2017 15:00:07 +0000 (11:00 -0400)
commitf93e1cdcf42c1218e2a73be477d8ac21135e7f56
tree5ad589f300e3c2e2f7d053b0d15f5c1ee4157178
parent31efcc250a1dea96edca6595a9639d898cf99ae5
net/sched: fix filter flushing

When user instructs to remove all filters from chain, we cannot destroy
the chain as other actions may hold a reference. Also the put in errout
would try to destroy it again. So instead, just walk the chain and remove
all existing filters.

Fixes: 5bc1701881e3 ("net: sched: introduce multichain support for filters")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c