[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/devel linux-2.6-lockdep-fixes.patch, NONE, 1.1 kernel-2.6.spec, 1.2347, 1.2348



Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv23590

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-lockdep-fixes.patch 
Log Message:
lockdep fixes


linux-2.6-lockdep-fixes.patch:
 include/net/sock.h |    6 +++---
 kernel/lockdep.c   |   14 +++++++++++---
 net/atm/ipcommon.c |   23 ++++++++++++++++++-----
 3 files changed, 32 insertions(+), 11 deletions(-)

--- NEW FILE linux-2.6-lockdep-fixes.patch ---
>From davej  Tue Jul  4 11:14:48 2006
Return-path: <linux-kernel-owner+davej=40kernelslacker org-S932219AbWGDPNk vger kernel org>
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on 
	nwo.kernelslacker.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=3.1.3
Envelope-to: davej kernelslacker org
Delivery-date: Tue, 04 Jul 2006 16:14:06 +0100
Received: from testure.choralone.org [194.9.77.134]
	by nwo.kernelslacker.org with IMAP (fetchmail-6.3.4)
	for <davej localhost> (single-drop); Tue, 04 Jul 2006 11:14:48 -0400 (EDT)
Received: from vger.kernel.org ([209.132.176.167])
	by testure.choralone.org with esmtp (Exim 4.62)
	(envelope-from <linux-kernel-owner+davej=40kernelslacker org-S932219AbWGDPNk vger kernel org>)
	id 1FxmbF-0005Ps-OM
	for davej kernelslacker org; Tue, 04 Jul 2006 16:14:06 +0100
Received: (majordomo vger kernel org) by vger.kernel.org via listexpand
	id S932219AbWGDPNk (ORCPT <rfc822;davej kernelslacker org>);
	Tue, 4 Jul 2006 11:13:40 -0400
Received: (majordomo vger kernel org) by vger.kernel.org id S932210AbWGDPNj
	(ORCPT <rfc822;linux-kernel-outgoing>);
	Tue, 4 Jul 2006 11:13:39 -0400
Received: from pentafluge.infradead.org ([213.146.154.40]:62345 "EHLO
	pentafluge.infradead.org") by vger.kernel.org with ESMTP
	id S932209AbWGDPNi (ORCPT <rfc822;linux-kernel vger kernel org>);
	Tue, 4 Jul 2006 11:13:38 -0400
Received: from a222036.upc-a.chello.nl ([62.163.222.36] helo=[172.31.3.43])
	by pentafluge.infradead.org with esmtpsa (Exim 4.62 #1 (Red Hat Linux))
	id 1Fxmah-00067s-IM; Tue, 04 Jul 2006 16:13:31 +0100
Subject: Re: [BUG] scsi/io-elevator held lock freed.
From:	Arjan van de Ven <arjan infradead org>
To:	Daniel Walker <dwalker mvista com>
Cc:	mingo elte hu, linux-kernel vger kernel org,
	linux-scsi vger kernel org
In-Reply-To: <1152024854 29262 5 camel c-67-180-134-207 hsd1 ca comcast net>
References: <1152024854 29262 5 camel c-67-180-134-207 hsd1 ca comcast net>
Content-Type: text/plain
Date:	Tue, 04 Jul 2006 17:13:30 +0200
Message-Id: <1152026010 3109 66 camel laptopd505 fenrus org>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) 
Content-Transfer-Encoding: 7bit
X-SRS-Rewrite: SMTP reverse-path rewritten from <arjan infradead org> by pentafluge.infradead.org
	See http://www.infradead.org/rpr.html
Sender:	linux-kernel-owner vger kernel org
Precedence: bulk
X-Mailing-List:	linux-kernel vger kernel org
Status: RO
Content-Length: 2141
Lines: 64

On Tue, 2006-07-04 at 07:54 -0700, Daniel Walker wrote:
> I got this during boot. I booted the same kernel several times, and only
> saw it once. The kernel was 2.6.17-mm5 .
> 
> Daniel
> 
> 
> =========================
> [ BUG: held lock freed! ]
> -------------------------
> swapper/1 is freeing memory f73a8580-f73a867f, with a lock still held there!
> 2 locks held by swapper/1:
>  #0:  (&shost->scan_mutex){--..}, at: [<c0419098>] mutex_lock+0x8/0x10
>  #1:  (&eq->sysfs_lock){--..}, at: [<c0419098>] mutex_lock+0x8/0x10

blargh.. it'd be more useful if lockdep actually printed which lock it
is that it thinks is about to get freed.....

this patch ought to make it do that; could you at least add this to your
kernel?

Ingo, is this the right approach?

---
 kernel/lockdep.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.17-mm6/kernel/lockdep.c
===================================================================
--- linux-2.6.17-mm6.orig/kernel/lockdep.c
+++ linux-2.6.17-mm6/kernel/lockdep.c
@@ -2571,7 +2571,7 @@ static inline int in_range(const void *s
 
 static void
 print_freed_lock_bug(struct task_struct *curr, const void *mem_from,
-		     const void *mem_to)
+		     const void *mem_to, struct held_lock *hlock)
 {
 	if (!debug_locks_off())
 		return;
@@ -2583,6 +2583,7 @@ print_freed_lock_bug(struct task_struct 
 	printk(  "-------------------------\n");
 	printk("%s/%d is freeing memory %p-%p, with a lock still held there!\n",
 		curr->comm, curr->pid, mem_from, mem_to-1);
+	print_lock(hlock);
 	lockdep_print_held_locks(curr);
 
 	printk("\nstack backtrace:\n");
@@ -2616,7 +2617,7 @@ void debug_check_no_locks_freed(const vo
 					!in_range(mem_from, lock_to, mem_to))
 			continue;
 
-		print_freed_lock_bug(curr, mem_from, mem_to);
+		print_freed_lock_bug(curr, mem_from, mem_to, hlock);
 		break;
 	}
 	local_irq_restore(flags);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo vger kernel org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]