From: dingtianhong Date: Tue, 25 Mar 2014 09:00:10 +0000 (+0800) Subject: bonding: ratelimit pr_err() for bond xmit broadcast X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9152e26df20b9e5ffdbe0d5b96d0e9ff8b33ff31;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git bonding: ratelimit pr_err() for bond xmit broadcast It may spam if the system is out of the memory, add ratelimit for it. Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index ee17c246326e..cbadd6dccb2b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3656,8 +3656,8 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev) struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); if (!skb2) { - pr_err("%s: Error: bond_xmit_broadcast(): skb_clone() failed\n", - bond_dev->name); + net_err_ratelimited("%s: Error: %s: skb_clone() failed\n", + bond_dev->name, __func__); continue; } /* bond_dev_queue_xmit always returns 0 */