* [PATCH v2 1/1] mm/vmalloc.c: Add an error message if two areas overlap
@ 2020-07-10 19:44 Uladzislau Rezki (Sony)
0 siblings, 0 replies; only message in thread
From: Uladzislau Rezki (Sony) @ 2020-07-10 19:44 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, LKML, Uladzislau Rezki, Hillf Danton, Michal Hocko,
Matthew Wilcox, Oleksiy Avramchenko, Steven Rostedt
Before triggering a BUG() it would be useful to understand
how two areas overlap between each other. Print information
about start/end addresses of both VAs and their addresses.
For example if both are identical it could mean double free.
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
mm/vmalloc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 5a2b55c8dd9a..db2e1020dc51 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -549,8 +549,13 @@ find_va_links(struct vmap_area *va,
else if (va->va_end > tmp_va->va_start &&
va->va_start >= tmp_va->va_end)
link = &(*link)->rb_right;
- else
+ else {
+ pr_err("Overlaps: 0x%px(0x%lx-0x%lx), 0x%px(0x%lx-0x%lx)\n",
+ va, va->va_start, va->va_end, tmp_va,
+ tmp_va->va_start, tmp_va->va_end);
+
BUG();
+ }
} while (*link);
*parent = &tmp_va->rb_node;
--
2.20.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-10 19:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 19:44 [PATCH v2 1/1] mm/vmalloc.c: Add an error message if two areas overlap Uladzislau Rezki (Sony)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox