diff options
author | David S. Miller <davem@davemloft.net> | 2019-02-09 00:00:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-09 00:00:17 +0100 |
commit | a655fe9f194842693258f43b5382855db1c2f654 (patch) | |
tree | a6e523c42378f43881c421530941dcbb529461ab /net/rds | |
parent | xen-netback: mark expected switch fall-through (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-a655fe9f194842693258f43b5382855db1c2f654.tar.xz linux-a655fe9f194842693258f43b5382855db1c2f654.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
An ipvlan bug fix in 'net' conflicted with the abstraction away
of the IPV6 specific support in 'net-next'.
Similarly, a bug fix for mlx5 in 'net' conflicted with the flow
action conversion in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/bind.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rds/bind.c b/net/rds/bind.c index 762d2c6788a3..17c9d9f0c848 100644 --- a/net/rds/bind.c +++ b/net/rds/bind.c @@ -78,10 +78,10 @@ struct rds_sock *rds_find_bound(const struct in6_addr *addr, __be16 port, __rds_create_bind_key(key, addr, port, scope_id); 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 + if (rs && (sock_flag(rds_rs_to_sk(rs), SOCK_DEAD) || + !refcount_inc_not_zero(&rds_rs_to_sk(rs)->sk_refcnt))) rs = NULL; + rcu_read_unlock(); rdsdebug("returning rs %p for %pI6c:%u\n", rs, addr, |