diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-09-15 18:14:25 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-15 18:14:26 -0700 |
| commit | ba5c906d5177609bab766c7b0beca88465a2c268 (patch) | |
| tree | 4f9f75493f825b1dbf73f2e60ea1c16f4b5103d0 /tools/testing | |
| parent | page_pool: always add GFP_NOWARN for ATOMIC allocations (diff) | |
| parent | mptcp: pm: netlink: fix if-idx type (diff) | |
| download | linux-ba5c906d5177609bab766c7b0beca88465a2c268.tar.gz linux-ba5c906d5177609bab766c7b0beca88465a2c268.zip | |
Merge branch 'mptcp-misc-minor-cleanups'
Matthieu Baerts says:
====================
mptcp: misc minor cleanups
Here are some small unrelated cleanups collected when working on some
fixes recently.
- Patches 1 & 2: close file descriptors in exit paths in the selftests.
- Patch 3: fix a wrong type (int i/o u32) when parsing netlink message.
====================
Link: https://patch.msgid.link/20250912-net-next-mptcp-minor-fixes-6-18-v1-0-99d179b483ad@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/net/mptcp/mptcp_inq.c | 9 | ||||
| -rw-r--r-- | tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_inq.c b/tools/testing/selftests/net/mptcp/mptcp_inq.c index f3bcaa48df8f..8e8f6441ad8b 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_inq.c +++ b/tools/testing/selftests/net/mptcp/mptcp_inq.c @@ -502,6 +502,7 @@ static int server(int unixfd) process_one_client(r, unixfd); + close(fd); return 0; } @@ -580,8 +581,12 @@ int main(int argc, char *argv[]) die_perror("pipe"); s = xfork(); - if (s == 0) - return server(unixfds[1]); + if (s == 0) { + close(unixfds[0]); + ret = server(unixfds[1]); + close(unixfds[1]); + return ret; + } close(unixfds[1]); diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c index e934dd26a59d..e9c359df9416 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c @@ -722,6 +722,7 @@ static int server(int pipefd) process_one_client(r, pipefd); + close(fd); return 0; } @@ -847,8 +848,12 @@ int main(int argc, char *argv[]) die_perror("pipe"); s = xfork(); - if (s == 0) - return server(pipefds[1]); + if (s == 0) { + close(pipefds[0]); + ret = server(pipefds[1]); + close(pipefds[1]); + return ret; + } close(pipefds[1]); |
