diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2018-10-01 13:20:45 +0200 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2018-10-01 13:20:45 +0200 |
| commit | 30aa69e7bd9f7af3574120249eecb3726dcaf737 (patch) | |
| tree | b4a9ec1374ec9aed1022fdb32802c483952e5a97 /net/rds/bind.c | |
| parent | 63e037bc51b32d414cd07dd700e71359ce27a11f (diff) | |
| parent | 17b57b1883c1285f3d0dc2266e8f79286a7bef38 (diff) | |
| download | linux-next-30aa69e7bd9f7af3574120249eecb3726dcaf737.tar.gz linux-next-30aa69e7bd9f7af3574120249eecb3726dcaf737.zip | |
Merge tag 'v4.19-rc6' into devel
This is the 4.19-rc6 release
I needed to merge this in because of extensive conflicts in
the MSM and Intel pin control drivers. I know how to resolve
them, so let's do it like this.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'net/rds/bind.c')
| -rw-r--r-- | net/rds/bind.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/rds/bind.c b/net/rds/bind.c index 3ab55784b637..762d2c6788a3 100644 --- a/net/rds/bind.c +++ b/net/rds/bind.c @@ -76,11 +76,13 @@ struct rds_sock *rds_find_bound(const struct in6_addr *addr, __be16 port, struct rds_sock *rs; __rds_create_bind_key(key, addr, port, scope_id); - rs = rhashtable_lookup_fast(&bind_hash_table, key, ht_parms); + rcu_read_lock(); + rs = rhashtable_lookup(&bind_hash_table, key, ht_parms); if (rs && !sock_flag(rds_rs_to_sk(rs), SOCK_DEAD)) rds_sock_addref(rs); else rs = NULL; + rcu_read_unlock(); rdsdebug("returning rs %p for %pI6c:%u\n", rs, addr, ntohs(port)); @@ -235,6 +237,7 @@ int rds_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) goto out; } + sock_set_flag(sk, SOCK_RCU_FREE); ret = rds_add_bound(rs, binding_addr, &port, scope_id); if (ret) goto out; |
