提交 dd269db8 编写于 作者: A Artem Savkov 提交者: Steffen Klassert

xfrm: don't call xfrm_policy_cache_flush under xfrm_state_lock

I might be wrong but it doesn't look like xfrm_state_lock is required
for xfrm_policy_cache_flush and calling it under this lock triggers both
"sleeping function called from invalid context" and "possible circular
locking dependency detected" warnings on flush.

Fixes: ec30d78c xfrm: add xdst pcpu cache
Signed-off-by: NArtem Savkov <asavkov@redhat.com>
Acked-by: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 23e9fcfe
...@@ -732,12 +732,12 @@ int xfrm_state_flush(struct net *net, u8 proto, bool task_valid) ...@@ -732,12 +732,12 @@ int xfrm_state_flush(struct net *net, u8 proto, bool task_valid)
} }
} }
} }
out:
spin_unlock_bh(&net->xfrm.xfrm_state_lock);
if (cnt) { if (cnt) {
err = 0; err = 0;
xfrm_policy_cache_flush(); xfrm_policy_cache_flush();
} }
out:
spin_unlock_bh(&net->xfrm.xfrm_state_lock);
return err; return err;
} }
EXPORT_SYMBOL(xfrm_state_flush); EXPORT_SYMBOL(xfrm_state_flush);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册