Patch "selftests/tls: Add {} to avoid static checker warning" has been added to the 5.4-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/tls: Add {} to avoid static checker warning

to the 5.4-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-tls-add-to-avoid-static-checker-warning.patch
and it can be found in the queue-5.4 subdirectory.

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



commit a9316abc5944258247579abecc6f9a3768cacf56
Author: Kees Cook <keescook@xxxxxxxxxxxx>
Date:   Wed May 26 20:27:19 2021 -0700

    selftests/tls: Add {} to avoid static checker warning
    
    [ Upstream commit f50688b47c5858d2ff315d020332bf4cb6710837 ]
    
    This silences a static checker warning due to the unusual macro
    construction of EXPECT_*() by adding explicit {}s around the enclosing
    while loop.
    
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
    Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: c326ca98446e ("selftests: tls: swap the TX and RX sockets in some tests")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index 0ea44d975b6c1..032e08e8ce016 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -314,8 +314,9 @@ TEST_F(tls, sendmsg_large)
 		EXPECT_EQ(sendmsg(self->cfd, &msg, 0), send_len);
 	}
 
-	while (recvs++ < sends)
+	while (recvs++ < sends) {
 		EXPECT_NE(recv(self->fd, mem, send_len, 0), -1);
+	}
 
 	free(mem);
 }



[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