aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/af_alg.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-06-06 10:45:37 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-06-06 10:45:37 -0700
commit8dd06ef34b6e2f41b29fbf5fc1663780f2524285 (patch)
treed59152f37ea7b36c3cf1778e20b85239f89c4e77 /crypto/af_alg.c
parentInput: synaptics - add a second working PNP_ID for Lenovo T470s (diff)
parentInput: iqs269a - add missing I2C dependency (diff)
downloadlinux-dev-8dd06ef34b6e2f41b29fbf5fc1663780f2524285.tar.xz
linux-dev-8dd06ef34b6e2f41b29fbf5fc1663780f2524285.zip
Merge branch 'next' into for-linus
Prepare input updates for 5.8 merge window.
Diffstat (limited to 'crypto/af_alg.c')
-rw-r--r--crypto/af_alg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 0dceaabc6321..439367a8e95c 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -134,11 +134,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);
@@ -169,7 +171,7 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
sa->salg_name[sizeof(sa->salg_name) + addr_len - sizeof(*sa) - 1] = 0;
type = alg_get_type(sa->salg_type);
- if (IS_ERR(type) && PTR_ERR(type) == -ENOENT) {
+ if (PTR_ERR(type) == -ENOENT) {
request_module("algif-%s", sa->salg_type);
type = alg_get_type(sa->salg_type);
}