Patch "selftests/net: fix a char signedness issue" 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/net: fix a char signedness issue

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-net-fix-a-char-signedness-issue.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 d2208fab18b552fac856775254d212b6f7799072
Author: Willem de Bruijn <willemb@xxxxxxxxxx>
Date:   Fri Nov 24 12:15:20 2023 -0500

    selftests/net: fix a char signedness issue
    
    [ Upstream commit 7b29828c5af6841bdeb9fafa32fdfeff7ab9c407 ]
    
    Signedness of char is signed on x86_64, but unsigned on arm64.
    
    Fix the warning building cmsg_sender.c on signed platforms or
    forced with -fsigned-char:
    
        msg_sender.c:455:12:
        error: implicit conversion from 'int' to 'char'
        changes value from 128 to -128
        [-Werror,-Wconstant-conversion]
            buf[0] = ICMPV6_ECHO_REQUEST;
    
    constant ICMPV6_ECHO_REQUEST is 128.
    
    Link: https://lwn.net/Articles/911914
    Fixes: de17e305a810 ("selftests: net: cmsg_sender: support icmp and raw sockets")
    Signed-off-by: Willem de Bruijn <willemb@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231124171645.1011043-3-willemdebruijn.kernel@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/cmsg_sender.c b/tools/testing/selftests/net/cmsg_sender.c
index 24b21b15ed3fb..6ff3e732f449f 100644
--- a/tools/testing/selftests/net/cmsg_sender.c
+++ b/tools/testing/selftests/net/cmsg_sender.c
@@ -416,9 +416,9 @@ int main(int argc, char *argv[])
 {
 	struct addrinfo hints, *ai;
 	struct iovec iov[1];
+	unsigned char *buf;
 	struct msghdr msg;
 	char cbuf[1024];
-	char *buf;
 	int err;
 	int fd;
 



[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