Skip to content

Commit 9152e26

Browse files
dingtianhongdavem330
authored andcommitted
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 <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 054bb88 commit 9152e26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3656,8 +3656,8 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev)
36563656
struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
36573657

36583658
if (!skb2) {
3659-
pr_err("%s: Error: bond_xmit_broadcast(): skb_clone() failed\n",
3660-
bond_dev->name);
3659+
net_err_ratelimited("%s: Error: %s: skb_clone() failed\n",
3660+
bond_dev->name, __func__);
36613661
continue;
36623662
}
36633663
/* bond_dev_queue_xmit always returns 0 */

0 commit comments

Comments
 (0)