diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2022-11-18 21:25:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-31 15:32:13 +0300 |
commit | d24fd986ae9d40fe3fcea0c1d7c44605b3527ca4 (patch) | |
tree | 114cb35a9e2a103267b834b14096118451ec25be /Documentation | |
parent | 073b50de84cbc9064180097d89facecdbb49e177 (diff) | |
download | linux-d24fd986ae9d40fe3fcea0c1d7c44605b3527ca4.tar.xz |
net: Return errno in sk->sk_prot->get_port().
[ Upstream commit 7a7160edf1bfde25422262fb26851cef65f695d3 ]
We assume the correct errno is -EADDRINUSE when sk->sk_prot->get_port()
fails, so some ->get_port() functions return just 1 on failure and the
callers return -EADDRINUSE instead.
However, mptcp_get_port() can return -EINVAL. Let's not ignore the error.
Note the only exception is inet_autobind(), all of whose callers return
-EAGAIN instead.
Fixes: cec37a6e41aa ("mptcp: Handle MP_CAPABLE options for outgoing connections")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions