All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] scripts-gdb-fix-list_for_each.patch removed from -mm tree
@ 2021-02-27  2:32 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-02-27  2:32 UTC (permalink / raw)
  To: jan.kiszka, kbingham, mm-commits, prekageo


The patch titled
     Subject: scripts/gdb: fix list_for_each
has been removed from the -mm tree.  Its filename was
     scripts-gdb-fix-list_for_each.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: George Prekas <prekageo@amazon.com>
Subject: scripts/gdb: fix list_for_each

If the list is uninitialized (next pointer is NULL), list_for_each gets
stuck in an infinite loop. Print a message and treat list as empty.

Link: https://lkml.kernel.org/r/4ae23bb1-c333-f669-da2d-fa35c4f49018@amazon.com
Signed-off-by: George Prekas <prekageo@amazon.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/gdb/linux/lists.py |    5 +++++
 1 file changed, 5 insertions(+)

--- a/scripts/gdb/linux/lists.py~scripts-gdb-fix-list_for_each
+++ a/scripts/gdb/linux/lists.py
@@ -27,6 +27,11 @@ def list_for_each(head):
         raise TypeError("Must be struct list_head not {}"
                            .format(head.type))
 
+    if head['next'] == 0:
+        gdb.write("list_for_each: Uninitialized list '{}' treated as empty\n"
+                     .format(head.address))
+        return
+
     node = head['next'].dereference()
     while node.address != head.address:
         yield node.address
_

Patches currently in -mm which might be from prekageo@amazon.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-27  2:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27  2:32 [merged] scripts-gdb-fix-list_for_each.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.