summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-08-19 12:22:13 -0700
committerDavid S. Miller <davem@davemloft.net>2018-08-21 12:45:45 -0700
commit5ffe57da29b3802baeddaa40909682bbb4cb4d48 (patch)
tree445afddd040006b43d6d2ad85118b558ded5ca6c /kernel
parent4e407ff5cd67ec76eeeea1deec227b7982dc7f66 (diff)
act_ife: fix a potential deadlock
use_all_metadata() acquires read_lock(&ife_mod_lock), then calls add_metainfo() which calls find_ife_oplist() which acquires the same lock again. Deadlock! Introduce __add_metainfo() which accepts struct tcf_meta_ops *ops as an additional parameter and let its callers to decide how to find it. For use_all_metadata(), it already has ops, no need to find it again, just call __add_metainfo() directly. And, as ife_mod_lock is only needed for find_ife_oplist(), this means we can make non-atomic allocation for populate_metalist() now. Fixes: 817e9f2c5c26 ("act_ife: acquire ife_mod_lock before reading ifeoplist") 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>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions