From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
To: <linux-kernel@vger.kernel.org>
Cc: <m.mizuma@jp.fujitsu.com>
Subject: [PATCH] list_debug: show address of prev and next when list_del corruption is detected.
Date: Thu, 17 Nov 2016 14:47:11 +0900 [thread overview]
Message-ID: <582D445F.1050100@jp.fujitsu.com> (raw)
When list_del corruption is detected, the corruption may happen
because of the region of prev or next is destroyed. So, the
address of prev/next is useful to find the destroyer.
Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
---
lib/list_debug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/list_debug.c b/lib/list_debug.c
index 3859bf6..a9cbcdb 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -55,11 +55,11 @@ void __list_del_entry(struct list_head *entry)
"list_del corruption, %p->prev is LIST_POISON2 (%p)\n",
entry, LIST_POISON2) ||
WARN(prev->next != entry,
- "list_del corruption. prev->next should be %p, "
- "but was %p\n", entry, prev->next) ||
+ "list_del corruption. prev->next should be %p, but was %p (prev=%p)\n",
+ entry, prev->next, prev) ||
WARN(next->prev != entry,
- "list_del corruption. next->prev should be %p, "
- "but was %p\n", entry, next->prev))
+ "list_del corruption. next->prev should be %p, but was %p (next=%p)\n",
+ entry, next->prev, next))
return;
__list_del(prev, next);
--
1.8.3.1
reply other threads:[~2016-11-17 6:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=582D445F.1050100@jp.fujitsu.com \
--to=m.mizuma@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.