Prevent the system from becoming unstable or unusable due to a flood of
memory allocation error messages under memory pressure.
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
---
drivers/net/fddi/defza.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
linux-defza-ratelimit.diff
Index: linux-macro/drivers/net/fddi/defza.c
===================================================================
--- linux-macro.orig/drivers/net/fddi/defza.c
+++ linux-macro/drivers/net/fddi/defza.c
@@ -767,8 +767,9 @@ static void fza_rx(struct net_device *de
fp->rx_dma[i] = dma;
} else {
fp->stats.rx_dropped++;
- pr_notice("%s: memory squeeze, dropping packet\n",
- fp->name);
+ pr_notice_ratelimited(
+ "%s: memory squeeze, dropping packet\n",
+ fp->name);
}
err_rx: