Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934109AbcKQGB3 (ORCPT ); Thu, 17 Nov 2016 01:01:29 -0500 Received: from mgwkm01.jp.fujitsu.com ([202.219.69.168]:27473 "EHLO mgwkm01.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180AbcKQGB1 (ORCPT ); Thu, 17 Nov 2016 01:01:27 -0500 X-Greylist: delayed 683 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Nov 2016 01:01:27 EST Message-ID: <582D445F.1050100@jp.fujitsu.com> Date: Thu, 17 Nov 2016 14:47:11 +0900 From: Masayoshi Mizuma User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: CC: Subject: [PATCH] list_debug: show address of prev and next when list_del corruption is detected. Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1109 Lines: 31 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 --- 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