OSDN Git Service

act_ife: move tcfa_lock down to where necessary
authorCong Wang <xiyou.wangcong@gmail.com>
Sun, 19 Aug 2018 19:22:12 +0000 (12:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:42:56 +0000 (09:42 +0200)
commitc892575c97268007a56c2b94df8651e9d08c650b
treec46646161500fbdb86aa13c631504d48f4c599ed
parentdfb2b5b8ed4ffdc23c473e44c6e154297c7bc552
act_ife: move tcfa_lock down to where necessary

[ Upstream commit 4e407ff5cd67ec76eeeea1deec227b7982dc7f66 ]

The only time we need to take tcfa_lock is when adding
a new metainfo to an existing ife->metalist. We don't need
to take tcfa_lock so early and so broadly in tcf_ife_init().

This means we can always take ife_mod_lock first, avoid the
reverse locking ordering warning as reported by Vlad.

Reported-by: Vlad Buslov <vladbu@mellanox.com>
Tested-by: Vlad Buslov <vladbu@mellanox.com>
Cc: Vlad Buslov <vladbu@mellanox.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_ife.c