summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2023-04-06 13:08:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-24 17:30:20 +0100
commitbfa784e9cac28f4d9f28456a2f4eff4a428ea744 (patch)
treeaa040be322996e35fe183784325bb1a2cbddb7a2 /net
parent6f5292fddc5b8bac7553328a9c4c214cb4d66614 (diff)
downloadlinux-stable-bfa784e9cac28f4d9f28456a2f4eff4a428ea744.tar.gz
linux-stable-bfa784e9cac28f4d9f28456a2f4eff4a428ea744.tar.bz2
linux-stable-bfa784e9cac28f4d9f28456a2f4eff4a428ea744.zip
can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag
commit db2773d65b02aed319a93efdfb958087771d4e19 upstream. 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: https://github.com/hartkopp/can-isotp/issues/59 Cc: Oleksij Rempel <o.rempel@pengutronix.de> Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Fixes: 42bf50a1795a ("can: isotp: support MSG_TRUNC flag when reading from socket") Link: https://lore.kernel.org/20230505110308.81087-2-mkl@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/can/isotp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/can/isotp.c b/net/can/isotp.c
index 5761d4ab839d..1af623839bff 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -1106,7 +1106,7 @@ static int isotp_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
struct isotp_sock *so = isotp_sk(sk);
int ret = 0;
- if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK))
+ if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK | MSG_CMSG_COMPAT))
return -EINVAL;
if (!so->bound)