aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2010-07-20 02:45:56 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-20 16:28:05 -0400
commit70d4bf6d467a330ccc947df9b2608e329d9e7708 (patch)
tree477dff26ac865f785e9197065e4807daeb89958c /net/netlink
parent4b706372f18de53970e4c6887a96459590fef80a (diff)
drop_monitor: convert some kfree_skb call sites to consume_skb
Convert a few calls from kfree_skb to consume_skb Noticed while I was working on dropwatch that I was detecting lots of internal skb drops in several places. While some are legitimate, several were not, freeing skbs that were at the end of their life, rather than being discarded due to an error. This patch converts those calls sites from using kfree_skb to consume_skb, which quiets the in-kernel drop_monitor code from detecting them as drops. Tested successfully by myself Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7aeaa83193db..8648a9922aab 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1076,14 +1076,15 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 pid,
1076 sk_for_each_bound(sk, node, &nl_table[ssk->sk_protocol].mc_list) 1076 sk_for_each_bound(sk, node, &nl_table[ssk->sk_protocol].mc_list)
1077 do_one_broadcast(sk, &info); 1077 do_one_broadcast(sk, &info);
1078 1078
1079 kfree_skb(skb); 1079 consume_skb(skb);
1080 1080
1081 netlink_unlock_table(); 1081 netlink_unlock_table();
1082 1082
1083 kfree_skb(info.skb2); 1083 if (info.delivery_failure) {
1084 1084 kfree_skb(info.skb2);
1085 if (info.delivery_failure)
1086 return -ENOBUFS; 1085 return -ENOBUFS;
1086 } else
1087 consume_skb(info.skb2);
1087 1088
1088 if (info.delivered) { 1089 if (info.delivered) {
1089 if (info.congested && (allocation & __GFP_WAIT)) 1090 if (info.congested && (allocation & __GFP_WAIT))