]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - crypto/af_alg.c
crypto: af_alg - Use bh_lock_sock in sk_destruct
[mirror_ubuntu-bionic-kernel.git] / crypto / af_alg.c
index e915abfed8e4c6f3c972434900b16065b44f4075..ff6d7d32e92fcfed5afb2f115c4bf504382a429c 100644 (file)
@@ -139,11 +139,13 @@ void af_alg_release_parent(struct sock *sk)
        sk = ask->parent;
        ask = alg_sk(sk);
 
-       lock_sock(sk);
+       local_bh_disable();
+       bh_lock_sock(sk);
        ask->nokey_refcnt -= nokey;
        if (!last)
                last = !--ask->refcnt;
-       release_sock(sk);
+       bh_unlock_sock(sk);
+       local_bh_enable();
 
        if (last)
                sock_put(sk);