diff options
author | Eric Dumazet <edumazet@google.com> | 2012-06-27 00:23:44 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 15:40:57 -0700 |
commit | 22911fc581f6a241e2897a7a8603e97344a6ec82 (patch) | |
tree | 6ee795b8a163a584157c1eedd7630774f120b829 /net/ipv4/udp.c | |
parent | 4c3af034fafeb7269176bf1310c9bcff0b9fd9bb (diff) | |
download | lwn-22911fc581f6a241e2897a7a8603e97344a6ec82.tar.gz lwn-22911fc581f6a241e2897a7a8603e97344a6ec82.zip |
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/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index db017efb76ea..ee37d47d472e 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -108,6 +108,7 @@ #include <net/xfrm.h> #include <trace/events/udp.h> #include <linux/static_key.h> +#include <trace/events/skb.h> #include "udp_impl.h" struct udp_table udp_table __read_mostly; @@ -1220,8 +1221,10 @@ try_again: goto csum_copy_err; } - if (err) + if (unlikely(err)) { + trace_kfree_skb(skb, udp_recvmsg); goto out_free; + } if (!peeked) UDP_INC_STATS_USER(sock_net(sk), |