diff options
author | David S. Miller <davem@davemloft.net> | 2018-12-22 02:06:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-22 02:06:20 +0300 |
commit | ce28bb4453880759c5bdc2751629f1a865ea4a6e (patch) | |
tree | 549617a3c6ffb55402cb403b1d808a11e113b294 /net/ipv4 | |
parent | 64935310f2fc0128373bbbcfb5b8b49fd26e2ae8 (diff) | |
parent | 6cafab50eea327e0d198cc9579a60440fc959756 (diff) | |
download | linux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/inet_diag.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 4e5bc4b2f14e..1a4e9ff02762 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -998,7 +998,9 @@ next_chunk: if (!inet_diag_bc_sk(bc, sk)) goto next_normal; - sock_hold(sk); + if (!refcount_inc_not_zero(&sk->sk_refcnt)) + goto next_normal; + num_arr[accum] = num; sk_arr[accum] = sk; if (++accum == SKARR_SZ) |