Re: [PATCH] xfrm: don't call xfrm_policy_cache_flush under xfrm_state_lock

From: Steffen Klassert
Date: Thu Sep 28 2017 - 07:12:45 EST


On Wed, Sep 27, 2017 at 02:31:03PM +0200, Florian Westphal wrote:
> Artem Savkov <asavkov@xxxxxxxxxx> wrote:
> > 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: ec30d78c14a8 xfrm: add xdst pcpu cache
> > Signed-off-by: Artem Savkov <asavkov@xxxxxxxxxx>
>
> You're right, its not needed (and wrong).
>
> Acked-by: Florian Westphal <fw@xxxxxxxxx>

Applied to the ipsec tree, thanks everyone!