projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df0acdc
)
can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag
author
Oliver Hartkopp
<socketcan@hartkopp.net>
Thu, 6 Apr 2023 11:08:45 +0000
(13:08 +0200)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Mon, 15 May 2023 20:24:46 +0000
(22:24 +0200)
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>
net/can/isotp.c
patch
|
blob
|
blame
|
history
diff --git
a/net/can/isotp.c
b/net/can/isotp.c
index a750259cb79c4fb93cfc6d7b50193d585831cca7..84f9aba029017c47349aaed84639228a538fece1 100644
(file)
--- a/
net/can/isotp.c
+++ b/
net/can/isotp.c
@@
-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)