This is a note to let you know that I've just added the patch titled can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: can-j1939-recvmsg-allow-msg_cmsg_compat-flag.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 1db080cbdbab28752bbb1c86d64daf96253a5da1 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp <socketcan@xxxxxxxxxxxx> Date: Thu, 6 Apr 2023 13:08:45 +0200 Subject: can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag From: Oliver Hartkopp <socketcan@xxxxxxxxxxxx> commit 1db080cbdbab28752bbb1c86d64daf96253a5da1 upstream. 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 <o.rempel@xxxxxxxxxxxxxx> Suggested-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Signed-off-by: Oliver Hartkopp <socketcan@xxxxxxxxxxxx> Tested-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/20230505110308.81087-3-mkl@xxxxxxxxxxxxxx Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/can/j1939/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/can/j1939/socket.c +++ b/net/can/j1939/socket.c @@ -798,7 +798,7 @@ static int j1939_sk_recvmsg(struct socke 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) Patches currently in stable-queue which might be from socketcan@xxxxxxxxxxxx are queue-5.4/can-j1939-recvmsg-allow-msg_cmsg_compat-flag.patch