summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Gallek <kraig@google.com>2016-02-22 10:45:29 -0500
committerDavid S. Miller <davem@davemloft.net>2016-02-24 13:38:18 -0500
commite5fbfc1c2d7657eafed645727cb5d74731f6d68c (patch)
treefc7334074b73b90b8a1be537730d87ccd8f3ed01
parentf5461c27631672b9e95282812ee521c53f502eca (diff)
downloadop-kernel-dev-e5fbfc1c2d7657eafed645727cb5d74731f6d68c.zip
op-kernel-dev-e5fbfc1c2d7657eafed645727cb5d74731f6d68c.tar.gz
soreuseport: fix merge conflict in tcp bind
One of the validation checks for the new array-based TCP SO_REUSEPORT validation was unintentionally dropped in ea8add2b1903. This adds it back. Lack of this check allows the user to allocate multiple sock_reuseport structures (leaking all but the first). Fixes: ea8add2b1903 ("tcp/dccp: better use of ephemeral ports in bind()") Signed-off-by: Craig Gallek <kraig@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/inet_connection_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index d768230..bc5196e 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -202,6 +202,7 @@ tb_found:
if (((tb->fastreuse > 0 && reuse) ||
(tb->fastreuseport > 0 &&
+ !rcu_access_pointer(sk->sk_reuseport_cb) &&
sk->sk_reuseport && uid_eq(tb->fastuid, uid))) &&
smallest_size == -1)
goto success;
OpenPOWER on IntegriCloud