Patch "net: test: Fix printf format specifier in skb_segment kunit test" has been added to the 6.8-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

    net: test: Fix printf format specifier in skb_segment kunit test

to the 6.8-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:
     net-test-fix-printf-format-specifier-in-skb_segment-.patch
and it can be found in the queue-6.8 subdirectory.

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



commit f31145b793c840ce6f831abd75b1888f3640c6b8
Author: David Gow <davidgow@xxxxxxxxxx>
Date:   Wed Feb 21 17:27:19 2024 +0800

    net: test: Fix printf format specifier in skb_segment kunit test
    
    [ Upstream commit ff3b96f2c9e5c24fca12239cd519a8a18569e687 ]
    
    KUNIT_FAIL() accepts a printf-style format string, but previously did
    not let gcc validate it with the __printf() attribute. The use of %lld
    for the result of PTR_ERR() is not correct.
    
    Instead, use %pe and pass the actual error pointer. printk() will format
    it correctly (and give a symbolic name rather than a number if
    available, which should make the output more readable, too).
    
    Fixes: b3098d32ed6e ("net: add skb_segment kunit test")
    Signed-off-by: David Gow <davidgow@xxxxxxxxxx>
    Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Reviewed-by: Justin Stitt <justinstitt@xxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/gso_test.c b/net/core/gso_test.c
index 4c2e77bd12f4b..358c44680d917 100644
--- a/net/core/gso_test.c
+++ b/net/core/gso_test.c
@@ -225,7 +225,7 @@ static void gso_test_func(struct kunit *test)
 
 	segs = skb_segment(skb, features);
 	if (IS_ERR(segs)) {
-		KUNIT_FAIL(test, "segs error %lld", PTR_ERR(segs));
+		KUNIT_FAIL(test, "segs error %pe", segs);
 		goto free_gso_skb;
 	} else if (!segs) {
 		KUNIT_FAIL(test, "no segments");




[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