* [patch -next] udp: fix if statement in SIOCINQ ioctl
@ 2016-04-18 8:44 Dan Carpenter
2016-04-18 12:19 ` Eric Dumazet
2016-04-18 17:40 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-04-18 8:44 UTC (permalink / raw)
To: David S. Miller, Willem de Bruijn
Cc: Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
Patrick McHardy, netdev, linux-kernel, kernel-janitors
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);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch -next] udp: fix if statement in SIOCINQ ioctl
2016-04-18 8:44 [patch -next] udp: fix if statement in SIOCINQ ioctl Dan Carpenter
@ 2016-04-18 12:19 ` Eric Dumazet
2016-04-18 13:41 ` Willem de Bruijn
2016-04-18 17:40 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2016-04-18 12:19 UTC (permalink / raw)
To: Dan Carpenter
Cc: David S. Miller, Willem de Bruijn, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, netdev, linux-kernel,
kernel-janitors
On Mon, 2016-04-18 at 11:44 +0300, Dan Carpenter wrote:
> 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>
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch -next] udp: fix if statement in SIOCINQ ioctl
2016-04-18 12:19 ` Eric Dumazet
@ 2016-04-18 13:41 ` Willem de Bruijn
0 siblings, 0 replies; 4+ messages in thread
From: Willem de Bruijn @ 2016-04-18 13:41 UTC (permalink / raw)
To: Eric Dumazet
Cc: Dan Carpenter, David S. Miller, Willem de Bruijn,
Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
Patrick McHardy, Network Development, LKML, kernel-janitors
On Mon, Apr 18, 2016 at 8:19 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Mon, 2016-04-18 at 11:44 +0300, Dan Carpenter wrote:
>> 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>
>
> Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Thanks for catching this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch -next] udp: fix if statement in SIOCINQ ioctl
2016-04-18 8:44 [patch -next] udp: fix if statement in SIOCINQ ioctl Dan Carpenter
2016-04-18 12:19 ` Eric Dumazet
@ 2016-04-18 17:40 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2016-04-18 17:40 UTC (permalink / raw)
To: dan.carpenter
Cc: willemb, kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel,
kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Mon, 18 Apr 2016 11:44:49 +0300
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-18 17:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-18 8:44 [patch -next] udp: fix if statement in SIOCINQ ioctl Dan Carpenter
2016-04-18 12:19 ` Eric Dumazet
2016-04-18 13:41 ` Willem de Bruijn
2016-04-18 17:40 ` 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).