Patch "selftests/bpf: Close fd in error path in drop_on_reuseport" has been added to the 5.10-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    selftests/bpf: Close fd in error path in drop_on_reuseport

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-bpf-close-fd-in-error-path-in-drop_on_reus.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 70f73fd411a68bd8f9bdad6897c612339c3be3d8
Author: Geliang Tang <geliang@xxxxxxxxxx>
Date:   Tue Jul 9 17:16:19 2024 +0800

    selftests/bpf: Close fd in error path in drop_on_reuseport
    
    [ Upstream commit adae187ebedcd95d02f045bc37dfecfd5b29434b ]
    
    In the error path when update_lookup_map() fails in drop_on_reuseport in
    prog_tests/sk_lookup.c, "server1", the fd of server 1, should be closed.
    This patch fixes this by using "goto close_srv1" lable instead of "detach"
    to close "server1" in this case.
    
    Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point")
    Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
    Signed-off-by: Geliang Tang <tanggeliang@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/86aed33b4b0ea3f04497c757845cff7e8e621a2d.1720515893.git.tanggeliang@xxxxxxxxxx
    Signed-off-by: Martin KaFai Lau <martin.lau@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c
index b4c9f4a96ae4d..95a1d3ee55a78 100644
--- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c
+++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c
@@ -964,7 +964,7 @@ static void drop_on_reuseport(const struct test *t)
 
 	err = update_lookup_map(t->sock_map, SERVER_A, server1);
 	if (err)
-		goto detach;
+		goto close_srv1;
 
 	/* second server on destination address we should never reach */
 	server2 = make_server(t->sotype, t->connect_to.ip, t->connect_to.port,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux