Skip to content

Commit 1db080c

Browse files
hartkoppmarckleinebudde
authored andcommitted
can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag
The control message provided by J1939 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]> Tested-by: Oleksij Rempel <[email protected]> Acked-by: Oleksij Rempel <[email protected]> Fixes: 9d71dd0 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/[email protected] Cc: [email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent db2773d commit 1db080c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/can/j1939/socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ static int j1939_sk_recvmsg(struct socket *sock, struct msghdr *msg,
798798
struct j1939_sk_buff_cb *skcb;
799799
int ret = 0;
800800

801-
if (flags & ~(MSG_DONTWAIT | MSG_ERRQUEUE))
801+
if (flags & ~(MSG_DONTWAIT | MSG_ERRQUEUE | MSG_CMSG_COMPAT))
802802
return -EINVAL;
803803

804804
if (flags & MSG_ERRQUEUE)

0 commit comments

Comments
 (0)