Patch "net: add a route cache full diagnostic message" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: add a route cache full diagnostic message

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-add-a-route-cache-full-diagnostic-message.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From SRS0=s4sW=IX=amazon.com=prvs=73518ea15=surajjs@xxxxxxxxxx Sat Jan 13 01:55:37 2024
From: Suraj Jitindar Singh <surajjs@xxxxxxxxxx>
Date: Fri, 12 Jan 2024 16:53:05 -0800
Subject: net: add a route cache full diagnostic message
To: <stable@xxxxxxxxxxxxxxx>
Cc: <gregkh@xxxxxxxxxxxxxxxxxxx>, <trawets@xxxxxxxxxx>, <security@xxxxxxxxxx>, Peter Oskolkov <posk@xxxxxxxxxx>, "David S . Miller" <davem@xxxxxxxxxxxxx>, Suraj Jitindar Singh <surajjs@xxxxxxxxxx>
Message-ID: <20240113005308.2422331-1-surajjs@xxxxxxxxxx>

From: Peter Oskolkov <posk@xxxxxxxxxx>

commit 22c2ad616b74f3de2256b242572ab449d031d941 upstream.

In some testing scenarios, dst/route cache can fill up so quickly
that even an explicit GC call occasionally fails to clean it up. This leads
to sporadically failing calls to dst_alloc and "network unreachable" errors
to the user, which is confusing.

This patch adds a diagnostic message to make the cause of the failure
easier to determine.

Signed-off-by: Peter Oskolkov <posk@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Suraj Jitindar Singh <surajjs@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx> # 4.19.x
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/core/dst.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -98,8 +98,12 @@ void *dst_alloc(struct dst_ops *ops, str
 	struct dst_entry *dst;
 
 	if (ops->gc && dst_entries_get_fast(ops) > ops->gc_thresh) {
-		if (ops->gc(ops))
+		if (ops->gc(ops)) {
+			printk_ratelimited(KERN_NOTICE "Route cache is full: "
+					   "consider increasing sysctl "
+					   "net.ipv[4|6].route.max_size.\n");
 			return NULL;
+		}
 	}
 
 	dst = kmem_cache_alloc(ops->kmem_cachep, GFP_ATOMIC);


Patches currently in stable-queue which might be from surajjs@xxxxxxxxxx are

queue-4.19/ipv6-remove-max_size-check-inline-with-ipv4.patch
queue-4.19/net-dst-use-a-smaller-percpu_counter-batch-for-dst-entries-accounting.patch
queue-4.19/net-add-a-route-cache-full-diagnostic-message.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux