diff options
author | Rick Jones <rick.jones2@hp.com> | 2014-11-17 14:04:29 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-18 15:28:28 -0500 |
commit | e3e3217029a35c579bf100998b43976d0b1cb8d7 (patch) | |
tree | dc2e5073002588cea3bb600e9df7d8de00359d86 /net/ipv4/ping.c | |
parent | 54aeba7f06323e04d59a6053ee3c6023079667b2 (diff) | |
download | blackbird-obmc-linux-e3e3217029a35c579bf100998b43976d0b1cb8d7.tar.gz blackbird-obmc-linux-e3e3217029a35c579bf100998b43976d0b1cb8d7.zip |
icmp: Remove some spurious dropped packet profile hits from the ICMP path
If icmp_rcv() has successfully processed the incoming ICMP datagram, we
should use consume_skb() rather than kfree_skb() because a hit on the likes
of perf -e skb:kfree_skb is not called-for.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 736236c3e554..ce2920f5bef3 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -955,7 +955,7 @@ EXPORT_SYMBOL_GPL(ping_queue_rcv_skb); * All we need to do is get the socket. */ -void ping_rcv(struct sk_buff *skb) +bool ping_rcv(struct sk_buff *skb) { struct sock *sk; struct net *net = dev_net(skb->dev); @@ -974,11 +974,11 @@ void ping_rcv(struct sk_buff *skb) pr_debug("rcv on socket %p\n", sk); ping_queue_rcv_skb(sk, skb_get(skb)); sock_put(sk); - return; + return true; } pr_debug("no socket, dropping\n"); - /* We're called from icmp_rcv(). kfree_skb() is done there. */ + return false; } EXPORT_SYMBOL_GPL(ping_rcv); |