Skip to content

Commit 46c5f2f

Browse files
committed
can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag
JIRA: https://issues.redhat.com/browse/RHEL-80832 commit db2773d Author: Oliver Hartkopp <[email protected]> Date: Thu Apr 6 13:08:45 2023 +0200 can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag The control message provided by isotp support MSG_CMSG_COMPAT but blocked recvmsg() syscalls that have set this flag, i.e. on 32bit user space on 64 bit kernels. Link: hartkopp/can-isotp#59 Cc: Oleksij Rempel <[email protected]> Suggested-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Fixes: 42bf50a ("can: isotp: support MSG_TRUNC flag when reading from socket") Link: https://lore.kernel.org/[email protected] Cc: [email protected] Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Radu Rendec <[email protected]>
1 parent 51b36e0 commit 46c5f2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/can/isotp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ static int isotp_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
11071107
struct isotp_sock *so = isotp_sk(sk);
11081108
int ret = 0;
11091109

1110-
if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK))
1110+
if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK | MSG_CMSG_COMPAT))
11111111
return -EINVAL;
11121112

11131113
if (!so->bound)

0 commit comments

Comments
 (0)