Skip to content

Commit db2773d

Browse files
hartkoppmarckleinebudde
authored andcommitted
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]>
1 parent df0acdc commit db2773d

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
@@ -1139,7 +1139,7 @@ static int isotp_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
11391139
struct isotp_sock *so = isotp_sk(sk);
11401140
int ret = 0;
11411141

1142-
if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK))
1142+
if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK | MSG_CMSG_COMPAT))
11431143
return -EINVAL;
11441144

11451145
if (!so->bound)

0 commit comments

Comments
 (0)