mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
soreuseport: fix merge conflict in tcp bind
One of the validation checks for the new array-based TCP SO_REUSEPORT validation was unintentionally dropped inea8add2b19
. This adds it back. Lack of this check allows the user to allocate multiple sock_reuseport structures (leaking all but the first). Fixes:ea8add2b19
("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>
This commit is contained in:
parent
f5461c2763
commit
e5fbfc1c2d
1 changed files with 1 additions and 0 deletions
|
@ -202,6 +202,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue