aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Hartkopp <[email protected]>2023-04-06 13:08:45 +0200
committerMarc Kleine-Budde <[email protected]>2023-05-15 22:24:46 +0200
commit1db080cbdbab28752bbb1c86d64daf96253a5da1 (patch)
treeefdedcecbb03da75b47d7c802ec1f42c4f54dc23
parentdb2773d65b02aed319a93efdfb958087771d4e19 (diff)
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: https://github.com/hartkopp/can-isotp/issues/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: 9d71dd0c7009 ("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]>
-rw-r--r--net/can/j1939/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/can/j1939/socket.c b/net/can/j1939/socket.c
index 7e90f9e61d9b..1790469b2580 100644
--- a/net/can/j1939/socket.c
+++ b/net/can/j1939/socket.c
@@ -798,7 +798,7 @@ static int j1939_sk_recvmsg(struct socket *sock, struct msghdr *msg,
struct j1939_sk_buff_cb *skcb;
int ret = 0;
- if (flags & ~(MSG_DONTWAIT | MSG_ERRQUEUE))
+ if (flags & ~(MSG_DONTWAIT | MSG_ERRQUEUE | MSG_CMSG_COMPAT))
return -EINVAL;
if (flags & MSG_ERRQUEUE)