From: Dan Carpenter <dan.carpenter@oracle•com>
To: "David S. Miller" <davem@davemloft•net>,
Willem de Bruijn <willemb@google•com>
Cc: Alexey Kuznetsov <kuznet@ms2•inr.ac.ru>,
James Morris <jmorris@namei•org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6•org>,
Patrick McHardy <kaber@trash•net>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
kernel-janitors@vger•kernel.org
Subject: [patch -next] udp: fix if statement in SIOCINQ ioctl
Date: Mon, 18 Apr 2016 11:44:49 +0300 [thread overview]
Message-ID: <20160418084449.GA12410@mwanda> (raw)
We deleted a line of code and accidentally made the "return put_user()"
part of the if statement when it's supposed to be unconditional.
Fixes: 9f9a45beaa96 ('udp: do not expect udp headers on ioctl SIOCINQ')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle•com>
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index f186313..37e09c3 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1276,12 +1276,6 @@ int udp_ioctl(struct sock *sk, int cmd, unsigned long arg)
{
unsigned int amount = first_packet_length(sk);
- if (amount)
- /*
- * We will only return the amount
- * of this packet since that is all
- * that will be read.
- */
return put_user(amount, (int __user *)arg);
}
next reply other threads:[~2016-04-18 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 8:44 Dan Carpenter [this message]
2016-04-18 12:19 ` [patch -next] udp: fix if statement in SIOCINQ ioctl Eric Dumazet
2016-04-18 13:41 ` Willem de Bruijn
2016-04-18 17:40 ` 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=20160418084449.GA12410@mwanda \
--to=dan.carpenter@oracle$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jmorris@namei$(echo .)org \
--cc=kaber@trash$(echo .)net \
--cc=kernel-janitors@vger$(echo .)kernel.org \
--cc=kuznet@ms2$(echo .)inr.ac.ru \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=willemb@google$(echo .)com \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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