Revert "CHROMIUM: Log RTM_NEWLINK messages broadcast from the kernel (temporary)"
authorJulius Werner <jwerner@chromium.org>
Fri, 11 Jan 2013 19:03:44 +0000 (11:03 -0800)
committerChromeBot <chrome-bot@google.com>
Thu, 31 Jan 2013 03:58:08 +0000 (19:58 -0800)
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 <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41139
Reviewed-by: Sameer Nanda <snanda@chromium.org>
net/netlink/af_netlink.c

index 8c9fede..ea881ea 100644 (file)
@@ -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();