On Sat, May 20, 2017 at 6:01 AM, Jiri Pirko <j...@resnulli.us> wrote:
> +static void tcf_chain_destroy(struct tcf_chain *chain)
> +{
> +       list_del(&chain->list);
> +       tcf_chain_flush(chain);
>         kfree(chain);
>  }
>
> @@ -510,7 +517,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct 
> nlmsghdr *n,
>
>         if (n->nlmsg_type == RTM_DELTFILTER && prio == 0) {
>                 tfilter_notify_chain(net, skb, n, chain, RTM_DELTFILTER);
> -               tcf_chain_destroy(chain);
> +               tcf_chain_flush(chain);


I wonder if we should return EBUSY and do nothing in case of busy?
The chain is no longer visual to new actions after your list_del(), but
the old one could still use and see it.

Reply via email to