]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita6a5670879d1ae977d2091306e2e8ac3311cb068
tree5ad589f300e3c2e2f7d053b0d15f5c1ee4157178
parentd9f0d56492f7b90f85f88162caf35fb41f31e800
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: 78526a0e48a9 ("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