diff --git a/net/key/af_key.c b/net/key/af_key.c index e340e97224c3ade65f0d201909d8615ff8b3f14d..cd3ba8a6045140a3565e67dd9e4cbe96e6ebaafa 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1707,9 +1707,11 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad pfk->registered |= (1<sadb_msg_satype); } + mutex_lock(&pfkey_mutex); xfrm_probe_algs(); supp_skb = compose_sadb_supported(hdr, GFP_KERNEL); + mutex_unlock(&pfkey_mutex); if (!supp_skb) { if (hdr->sadb_msg_satype != SADB_SATYPE_UNSPEC) pfk->registered &= ~(1<sadb_msg_satype);