]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
FDDI: defza: Rate-limit memory allocation errors
authorMaciej W. Rozycki <macro@orcam.me.uk>
Sun, 29 Mar 2026 12:32:34 +0000 (13:32 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 31 Mar 2026 01:11:31 +0000 (18:11 -0700)
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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/alpine.DEB.2.21.2603291252380.60268@angie.orcam.me.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/fddi/defza.c

index 2098c3068d34f7b479d353301ab1eb1f9475d17f..064fa484f797af558d336f6f58e7b435433c8a10 100644 (file)
@@ -767,8 +767,9 @@ static void fza_rx(struct net_device *dev)
                        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: