Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2025 18:13:13 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9f55630b8d72 - main - linux: Fix a typo in linux_recvmsg_common
Message-ID:  <202503101813.52AIDDw0001467@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=9f55630b8d72602f6ec86b15b607f5fc5fde911e

commit 9f55630b8d72602f6ec86b15b607f5fc5fde911e
Author:     Alex S <iwtcex@gmail.com>
AuthorDate: 2025-03-10 18:12:36 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-03-10 18:12:36 +0000

    linux: Fix a typo in linux_recvmsg_common
    
    We are supposed to check the result of bsd_to_linux_sockopt_level here
    rather than its input.
---
 sys/compat/linux/linux_socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 6c6751ad30a8..a33b502f2201 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1858,7 +1858,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr,
 		lcm->cmsg_level = bsd_to_linux_sockopt_level(cm->cmsg_level);
 
 		if (lcm->cmsg_type == -1 ||
-		    cm->cmsg_level == -1) {
+		    lcm->cmsg_level == -1) {
 			LINUX_RATELIMIT_MSG_OPT2(
 			    "unsupported recvmsg cmsg level %d type %d",
 			    cm->cmsg_level, cm->cmsg_type);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202503101813.52AIDDw0001467>