Re: [PATCH bpf-next v2] selftests/bpf: fix a CI failure caused by vsock write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/1/23 10:38 AM, Xu Kuohai wrote:
On 9/1/2023 4:22 PM, Daniel Borkmann wrote:
On 9/1/23 5:10 AM, Xu Kuohai wrote:
From: Xu Kuohai <xukuohai@xxxxxxxxxx>
[...]
Should the error path rather be ?

diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
index 2d3bf38677b6..8df8cbb447f1 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
@@ -1454,7 +1454,7 @@ static int vsock_socketpair_connectible(int sotype, int *v0, int *v1)

         if (poll_connect(c, IO_TIMEOUT_SEC) < 0) {
                 FAIL_ERRNO("poll_connect");
-               goto close_cli;
+               goto close_acc;
         }

         *v0 = p;
@@ -1462,6 +1462,8 @@ static int vsock_socketpair_connectible(int sotype, int *v0, int *v1)

         return 0;

+close_acc:
+       close(p);
  close_cli:
         close(c);
  close_srv:


Let me know and I'll squash this into the fix.


Right, the accepted connection should be closed, thanks.

Ok, done, pushed.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux