diff options
author | Eric Dumazet <edumazet@google.com> | 2012-06-26 20:23:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 18:40:57 -0400 |
commit | 22911fc581f6a241e2897a7a8603e97344a6ec82 (patch) | |
tree | 6ee795b8a163a584157c1eedd7630774f120b829 /net/ipv4/udp.c | |
parent | 4c3af034fafeb7269176bf1310c9bcff0b9fd9bb (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/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 @@ | |||
108 | #include <net/xfrm.h> | 108 | #include <net/xfrm.h> |
109 | #include <trace/events/udp.h> | 109 | #include <trace/events/udp.h> |
110 | #include <linux/static_key.h> | 110 | #include <linux/static_key.h> |
111 | #include <trace/events/skb.h> | ||
111 | #include "udp_impl.h" | 112 | #include "udp_impl.h" |
112 | 113 | ||
113 | struct udp_table udp_table __read_mostly; | 114 | struct udp_table udp_table __read_mostly; |
@@ -1220,8 +1221,10 @@ try_again: | |||
1220 | goto csum_copy_err; | 1221 | goto csum_copy_err; |
1221 | } | 1222 | } |
1222 | 1223 | ||
1223 | if (err) | 1224 | if (unlikely(err)) { |
1225 | trace_kfree_skb(skb, udp_recvmsg); | ||
1224 | goto out_free; | 1226 | goto out_free; |
1227 | } | ||
1225 | 1228 | ||
1226 | if (!peeked) | 1229 | if (!peeked) |
1227 | UDP_INC_STATS_USER(sock_net(sk), | 1230 | UDP_INC_STATS_USER(sock_net(sk), |