mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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: 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]>
Fixes: 42bf50a179 ("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]>
This commit is contained in:
committed by
Marc Kleine-Budde
parent
df0acdc59b
commit
db2773d65b
+1
-1
@@ -1139,7 +1139,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)
|
||||
|
||||
Reference in New Issue
Block a user