aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-06-26 20:23:44 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-27 18:40:57 -0400
commit22911fc581f6a241e2897a7a8603e97344a6ec82 (patch)
tree6ee795b8a163a584157c1eedd7630774f120b829 /net/ipv6
parent4c3af034fafeb7269176bf1310c9bcff0b9fd9bb (diff)
net: skb_free_datagram_locked() doesnt drop all packets
dropwatch wrongly diagnose all received UDP packets as drops. This patch removes trace_kfree_skb() done in skb_free_datagram_locked(). Locations calling skb_free_datagram_locked() should do it on their own. As a result, drops are accounted on the right function. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/udp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 051ad481973f..1ecd10249488 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -48,6 +48,7 @@
48 48
49#include <linux/proc_fs.h> 49#include <linux/proc_fs.h>
50#include <linux/seq_file.h> 50#include <linux/seq_file.h>
51#include <trace/events/skb.h>
51#include "udp_impl.h" 52#include "udp_impl.h"
52 53
53int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) 54int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
@@ -385,15 +386,16 @@ try_again:
385 386
386 if (skb_csum_unnecessary(skb)) 387 if (skb_csum_unnecessary(skb))
387 err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr), 388 err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr),
388 msg->msg_iov, copied ); 389 msg->msg_iov, copied);
389 else { 390 else {
390 err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov); 391 err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov);
391 if (err == -EINVAL) 392 if (err == -EINVAL)
392 goto csum_copy_err; 393 goto csum_copy_err;
393 } 394 }
394 if (err) 395 if (unlikely(err)) {
396 trace_kfree_skb(skb, udpv6_recvmsg);
395 goto out_free; 397 goto out_free;
396 398 }
397 if (!peeked) { 399 if (!peeked) {
398 if (is_udp4) 400 if (is_udp4)
399 UDP_INC_STATS_USER(sock_net(sk), 401 UDP_INC_STATS_USER(sock_net(sk),