Skip to content

Commit 51b36e0

Browse files
committed
can: isotp: restore accidentally removed MSG_PEEK feature
JIRA: https://issues.redhat.com/browse/RHEL-80832 commit e382fea Author: Oliver Hartkopp <[email protected]> Date: Mon Mar 28 13:36:11 2022 +0200 can: isotp: restore accidentally removed MSG_PEEK feature In commit 42bf50a ("can: isotp: support MSG_TRUNC flag when reading from socket") a new check for recvmsg flags has been introduced that only checked for the flags that are handled in isotp_recvmsg() itself. This accidentally removed the MSG_PEEK feature flag which is processed later in the call chain in __skb_try_recv_from_queue(). Add MSG_PEEK to the set of valid flags to restore the feature. Fixes: 42bf50a ("can: isotp: support MSG_TRUNC flag when reading from socket") Link: linux-can/can-utils#347 (comment) Link: https://lore.kernel.org/all/[email protected] Reported-by: Derek Will <[email protected]> Suggested-by: Derek Will <[email protected]> Tested-by: Derek Will <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Radu Rendec <[email protected]>
1 parent d7b6357 commit 51b36e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/can/isotp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ static int isotp_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
11071107
struct isotp_sock *so = isotp_sk(sk);
11081108
int ret = 0;
11091109

1110-
if (flags & ~(MSG_DONTWAIT | MSG_TRUNC))
1110+
if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK))
11111111
return -EINVAL;
11121112

11131113
if (!so->bound)

0 commit comments

Comments
 (0)