netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix MSG_OOB test in caif_seqpkt_recvmsg()
@ 2015-03-14  5:22 Al Viro
  2015-03-16  2:20 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2015-03-14  5:22 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Sjur Braendeland

	It should be checking flags, not msg->msg_flags.  It's ->sendmsg()
instances that need to look for that in ->msg_flags, ->recvmsg() ones
(including the other ->recvmsg() instance in that file, as well as
unix_dgram_recvmsg() this one claims to be imitating) check in flags.
Braino had been introduced in commit dcda13 ("caif: Bugfix - use MSG_TRUNC
in receive") back in 2010, so it goes quite a while back.

Cc: stable@vger.kernel.org # 2.6.35
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index 91aa225..1caa161 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -281,7 +281,7 @@ static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
 	int copylen;
 
 	ret = -EOPNOTSUPP;
-	if (m->msg_flags&MSG_OOB)
+	if (flags & MSG_OOB)
 		goto read_error;
 
 	skb = skb_recv_datagram(sk, flags, 0 , &ret);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-16  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-14  5:22 [PATCH] fix MSG_OOB test in caif_seqpkt_recvmsg() Al Viro
2015-03-16  2:20 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).