mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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: ec30d78c14
xfrm: add xdst pcpu cache
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
23e9fcfef1
commit
dd269db849
1 changed files with 2 additions and 2 deletions
|
@ -732,12 +732,12 @@ restart:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue