Snap for 13256841 from f8fa4a6ef7325447f3d8551f2badbb5c9ae308b5 to 25Q2-release

Change-Id: I3e31900fb8ead60ea1f37734b3957bcd14565fc1
diff --git a/README.md b/README.md
index b5748d4..d140016 100644
--- a/README.md
+++ b/README.md
@@ -60,14 +60,13 @@
                                  any eligible task (fast decision). Default = false
 
   - `ro.lmk.kill_timeout_ms`:    duration in ms after a kill when no additional
-                                 kill will be done. Default = 0 (disabled)
+                                 kill will be done. Default = 100
 
   - `ro.lmk.debug`:              enable lmkd debug logs, Default = false
 
   - `ro.lmk.swap_free_low_percentage`: level of free swap as a percentage of the
                                  total swap space used as a threshold to consider
-                                 the system as swap space starved. Default for
-                                 low-RAM devices = 10, for high-end devices = 20
+                                 the system as swap space starved. Default = 10
 
   - `ro.lmk.thrashing_limit`:    number of workingset refaults as a percentage of
                                 the file-backed pagecache size used as a threshold
diff --git a/lmkd.cpp b/lmkd.cpp
index 99f6b21..3cb458d 100644
--- a/lmkd.cpp
+++ b/lmkd.cpp
@@ -2234,6 +2234,10 @@
     struct adjslot_list *curr = head->next;
     struct proc *maxprocp = NULL;
     int maxsize = 0;
+    if ((curr != head) && (curr->next == head)) {
+        // Our list only has one process.  No need to access procfs for its size.
+        return (struct proc *)curr;
+    }
     while (curr != head) {
         int pid = ((struct proc *)curr)->pid;
         int tasksize = proc_get_size(pid);