Date: Mon, 24 Aug 2020 16:21:03 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364704 - stable/12/sys/compat/linux Message-ID: <202008241621.07OGL35L070589@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Mon Aug 24 16:21:03 2020 New Revision: 364704 URL: https://svnweb.freebsd.org/changeset/base/364704 Log: MFC r362176: Make linux(4) warn about unsupported CMSG level/type. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/compat/linux/linux_socket.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_socket.c ============================================================================== --- stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:15:12 2020 (r364703) +++ stable/12/sys/compat/linux/linux_socket.c Mon Aug 24 16:21:03 2020 (r364704) @@ -1041,8 +1041,12 @@ linux_sendmsg_common(struct thread *td, l_int s, struc cmsg->cmsg_level = linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); if (cmsg->cmsg_type == -1 - || cmsg->cmsg_level != SOL_SOCKET) + || cmsg->cmsg_level != SOL_SOCKET) { + linux_msg(curthread, + "unsupported sendmsg cmsg level %d type %d", + linux_cmsg.cmsg_level, linux_cmsg.cmsg_type); goto bad; + } /* * Some applications (e.g. pulseaudio) attempt to @@ -1227,6 +1231,9 @@ linux_recvmsg_common(struct thread *td, l_int s, struc bsd_to_linux_sockopt_level(cm->cmsg_level); if (linux_cmsg->cmsg_type == -1 || cm->cmsg_level != SOL_SOCKET) { + linux_msg(curthread, + "unsupported recvmsg cmsg level %d type %d", + cm->cmsg_level, cm->cmsg_type); error = EINVAL; goto bad; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008241621.07OGL35L070589>