Patch "selftests/bpf: Close obj in error path in xdp_adjust_tail" has been added to the 6.1-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 obj in error path in xdp_adjust_tail

to the 6.1-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-obj-in-error-path-in-xdp_adjust_.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 4ed93e05c060610f081009584ab7696de22fd60f
Author: Geliang Tang <geliang@xxxxxxxxxx>
Date:   Wed Jul 10 21:10:17 2024 +0800

    selftests/bpf: Close obj in error path in xdp_adjust_tail
    
    [ Upstream commit 52b49ec1b2c78deb258596c3b231201445ef5380 ]
    
    If bpf_object__load() fails in test_xdp_adjust_frags_tail_grow(), "obj"
    opened before this should be closed. So use "goto out" to close it instead
    of using "return" here.
    
    Fixes: 110221081aac ("bpf: selftests: update xdp_adjust_tail selftest to include xdp frags")
    Signed-off-by: Geliang Tang <tanggeliang@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/f282a1ed2d0e3fb38cceefec8e81cabb69cab260.1720615848.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/xdp_adjust_tail.c b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c
index 39973ea1ce433..89366913a251c 100644
--- a/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c
+++ b/tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c
@@ -217,7 +217,7 @@ static void test_xdp_adjust_frags_tail_grow(void)
 
 	prog = bpf_object__next_program(obj, NULL);
 	if (bpf_object__load(obj))
-		return;
+		goto out;
 
 	prog_fd = bpf_program__fd(prog);
 




[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