From af42f642ce668ae967bb6e5fa2d7526bdba13a8a Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 11 Jan 2013 11:03:44 -0800 Subject: [PATCH] Revert "CHROMIUM: Log RTM_NEWLINK messages broadcast from the kernel (temporary)" This reverts commit 0a06f97c7e44bbac8944732d7739ea95b79b2ac5 We have gathered all we need to know from this. The problem was in shill and we have changed that to properly crash instead of silently fail. The kernel netlink stack seems to work fine as it is and we don't need this output anymore. BUG=chromium-os:35479 TEST=Boot the kernel, make sure it still works fine and does not output any messages with the string "RTM_NEWLINK" to dmesg anymore. Change-Id: I9a12e41bb25adaf4ef7a7159d97adebfe2fd14e6 Signed-off-by: Julius Werner Reviewed-on: https://gerrit.chromium.org/gerrit/41139 Reviewed-by: Sameer Nanda --- net/netlink/af_netlink.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 8c9fede7e8a8..ea881ea4a103 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1014,7 +1014,6 @@ static int do_one_broadcast(struct sock *sk, if (p->failure) { netlink_overrun(sk); - p->failure += 1; goto out; } @@ -1049,7 +1048,7 @@ static int do_one_broadcast(struct sock *sk, p->delivery_failure = 1; } else { p->congested |= val; - p->delivered += 1; + p->delivered = 1; p->skb2 = NULL; } sock_put(sk); @@ -1068,9 +1067,6 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 pid, struct hlist_node *node; struct sock *sk; - struct nlmsghdr *nlh; - struct ifinfomsg *infomsg; - skb = netlink_trim(skb, allocation); info.exclude_sk = ssk; @@ -1094,18 +1090,6 @@ int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 pid, sk_for_each_bound(sk, node, &nl_table[ssk->sk_protocol].mc_list) do_one_broadcast(sk, &info); - /* - * temporary debug output - * TODO(jwerner): Revert after gathering data (crosbug 35479) - */ - nlh = (struct nlmsghdr *)skb->data; - infomsg = NLMSG_DATA(nlh); - if ((skb_end_pointer(skb) - skb->data) >= NLMSG_LENGTH(sizeof(*infomsg)) - && nlh->nlmsg_type == RTM_NEWLINK) - pr_info("RTM_NEWLINK: idx=%d, flags=0x%X, deliver=%d, fail=%d," - " congest=%d\n", infomsg->ifi_index, infomsg->ifi_flags, - info.delivered, info.failure, info.congested); - consume_skb(skb); netlink_unlock_table(); -- 2.20.1