• Vlad Buslov's avatar
    net_sched: change tcf_del_walker() to take idrinfo->lock · ec3ed293
    Vlad Buslov authored
    Action API was changed to work with actions and action_idr in concurrency
    safe manner, however tcf_del_walker() still uses actions without taking a
    reference or idrinfo->lock first, and deletes them directly, disregarding
    possible concurrent delete.
    Change tcf_del_walker() to take idrinfo->lock while iterating over actions
    and use new tcf_idr_release_unsafe() to release them while holding the
    And the blocking function fl_hw_destroy_tmplt() could be called when we
    put a filter chain, so defer it to a work queue.
    Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
    [xiyou.wangcong@gmail.com: heavily modify the code and changelog]
    Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>