Patch "selftests/bpf: Fix check_mtu using wrong variable type" has been added to the 6.3-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: Fix check_mtu using wrong variable type

to the 6.3-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-fix-check_mtu-using-wrong-variable-typ.patch
and it can be found in the queue-6.3 subdirectory.

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



commit 23d550ece4c04a2f8ce4ce75fe9e3122397d9f1e
Author: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
Date:   Tue Jun 6 13:30:47 2023 +0200

    selftests/bpf: Fix check_mtu using wrong variable type
    
    [ Upstream commit 095641817e1bf6aa2560e025e47575188ee3edaf ]
    
    Dan Carpenter found via Smatch static checker, that unsigned 'mtu_lo' is
    never less than zero.
    
    Variable mtu_lo should have been an 'int', because read_mtu_device_lo()
    uses minus as error indications.
    
    Fixes: b62eba563229 ("selftests/bpf: Tests using bpf_check_mtu BPF-helper")
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/168605104733.3636467.17945947801753092590.stgit@firesoul
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/prog_tests/check_mtu.c b/tools/testing/selftests/bpf/prog_tests/check_mtu.c
index 5338d2ea04603..2a9a30650350e 100644
--- a/tools/testing/selftests/bpf/prog_tests/check_mtu.c
+++ b/tools/testing/selftests/bpf/prog_tests/check_mtu.c
@@ -183,7 +183,7 @@ static void test_check_mtu_tc(__u32 mtu, __u32 ifindex)
 
 void serial_test_check_mtu(void)
 {
-	__u32 mtu_lo;
+	int mtu_lo;
 
 	if (test__start_subtest("bpf_check_mtu XDP-attach"))
 		test_check_mtu_xdp_attach();



[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