netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemb@google.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, luto@amacapital.net,
	richardcochran@gmail.com, Willem de Bruijn <willemb@google.com>
Subject: [PATCH net-next 1/3] ipv4: warn once on passing AF_INET6 socket to ip_recv_error
Date: Sun, 30 Nov 2014 22:22:33 -0500	[thread overview]
Message-ID: <1417404155-28607-2-git-send-email-willemb@google.com> (raw)
In-Reply-To: <1417404155-28607-1-git-send-email-willemb@google.com>

From: Willem de Bruijn <willemb@google.com>

One line change, in response to catching an occurrence of this bug.
See also fix f4713a3dfad0 ("net-timestamp: make tcp_recvmsg call ...")

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 net/ipv4/ip_sockglue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index b782657..59eba6c 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -414,6 +414,8 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
 	int err;
 	int copied;
 
+	WARN_ON_ONCE(sk->sk_family == AF_INET6);
+
 	err = -EAGAIN;
 	skb = sock_dequeue_err_skb(sk);
 	if (skb == NULL)
-- 
2.2.0.rc0.207.ga3a616c

  reply	other threads:[~2014-12-01  3:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  3:22 [PATCH net-next 0/3] timestamping updates Willem de Bruijn
2014-12-01  3:22 ` Willem de Bruijn [this message]
2014-12-01  3:22 ` [PATCH net-next 3/3] net-timestamp: expand documentation and test Willem de Bruijn
2014-12-01  8:49 ` [PATCH net-next 0/3] timestamping updates Richard Cochran
2014-12-09  1:21 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417404155-28607-2-git-send-email-willemb@google.com \
    --to=willemb@google.com \
    --cc=davem@davemloft.net \
    --cc=luto@amacapital.net \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).