diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-18 04:44:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-18 13:40:08 -0400 |
commit | 110361f41c17d1f565e2fd03a0af044c29e6513a (patch) | |
tree | a8dd122b317c38b621abf95a031f90d3fc84c0e1 | |
parent | 550bce59baf3f3059cd4ae1e268f08f2d2cb1d5c (diff) |
udp: fix if statement in SIOCINQ ioctl
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index f1863136d3e4..37e09c3dd046 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) | |||
1276 | { | 1276 | { |
1277 | unsigned int amount = first_packet_length(sk); | 1277 | unsigned int amount = first_packet_length(sk); |
1278 | 1278 | ||
1279 | if (amount) | ||
1280 | /* | ||
1281 | * We will only return the amount | ||
1282 | * of this packet since that is all | ||
1283 | * that will be read. | ||
1284 | */ | ||
1285 | return put_user(amount, (int __user *)arg); | 1279 | return put_user(amount, (int __user *)arg); |
1286 | } | 1280 | } |
1287 | 1281 | ||