Skip to content
  • Vlad Buslov's avatar
    net: sched: lock action when translating it to flow_action infra · 7a472814
    Vlad Buslov authored
    
    
    In order to remove dependency on rtnl lock, take action's tcfa_lock when
    constructing its representation as flow_action_entry structure.
    
    Refactor tcf_sample_get_group() to assume that caller holds tcf_lock and
    don't take it manually. This callback is only called from flow_action infra
    representation translator which now calls it with tcf_lock held, so this
    refactoring is necessary to prevent deadlock.
    
    Allocate memory with GFP_ATOMIC flag for ip_tunnel_info copy because
    tcf_tunnel_info_copy() is only called from flow_action representation infra
    code with tcf_lock spinlock taken.
    
    Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7a472814