From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934431AbXKPAjX (ORCPT ); Thu, 15 Nov 2007 19:39:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757481AbXKPAjP (ORCPT ); Thu, 15 Nov 2007 19:39:15 -0500 Received: from wr-out-0506.google.com ([64.233.184.228]:43014 "EHLO wr-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755308AbXKPAjN (ORCPT ); Thu, 15 Nov 2007 19:39:13 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=orLXgyZMw2aY3Vg1qjhINxoA0PKl3aPBWXhkGss/vY/KP0CE1Uaan3Y4Syp8jsI5wXga+Cy7R7RlrZOesWMET9nazrPS1Xztb0E6WKU1x64K3wfaUnwzOYdaEiA1t/5pBD1YKsOl21rs1duJF0OHy1qdL+EjtCy1yztOhRyQjQ0= Message-ID: Date: Fri, 16 Nov 2007 08:39:12 +0800 From: "Dave Young" To: "Greg KH" Subject: Re: 2.6.24-rc2-mm1 Cc: "Jiri Kosina" , "Andrew Morton" , linux-kernel@vger.kernel.org In-Reply-To: <20071115192319.GA30186@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20071113175906.497a1a6a.akpm@linux-foundation.org> <20071114083906.178232cb.akpm@linux-foundation.org> <20071114181948.GA15240@kroah.com> <20071115192319.GA30186@kroah.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Nov 16, 2007 3:23 AM, Greg KH wrote: > > On Wed, Nov 14, 2007 at 10:19:48AM -0800, Greg KH wrote: > > On Wed, Nov 14, 2007 at 06:02:07PM +0100, Jiri Kosina wrote: > > > On Wed, 14 Nov 2007, Jiri Kosina wrote: > > > > > > > > I'd suspect the driver tree. I think I'll need to do a quick -mm2 > > > > > without that tree present. > > > > I am just verifying whether reverting kset changes fixes this, will let > > > > you know soon. > > > > > > OK, so I reverted > > > gregkh-driver-kset-convert-block_subsys-to-use-kset_create (which made me > > > also revert gregkh-driver-kobject-remove-subsystem_register-functions and > > > gregkh-driver-kset-remove-decl_subsys-macro so that we compile). Both the > > > error message from lockdep and more importantly the spinlock lockup have > > > gone, and the system with these patches reverted boots for me fine. > > > > > > Well not that fine, I still see (which is the same backtrace that caused > > > the lockup with plain -rc2-mm1, but doesn't make the machine hang): > > > > > > floppy0: Floppy io-port 0x03f2 in use > > > WARNING: at lib/kref.c:33 kref_get() > > > > > > Call Trace: > > > [] kobject_add+0x9b/0x197 > > > [] kref_get+0x2f/0x36 > > > [] kobject_get+0x12/0x17 > > > [] kobject_add+0xad/0x197 > > > [] register_disk+0x48/0x205 > > > [] add_disk+0x34/0x3d > > > [] rd_init+0x172/0x1e1 > > > [] kernel_init+0x175/0x2e6 > > > [] trace_hardirqs_on+0x115/0x139 > > > [] trace_hardirqs_on_thunk+0x35/0x3a > > > [] trace_hardirqs_on+0x115/0x139 > > > [] child_rip+0xa/0x12 > > > [] restore_args+0x0/0x30 > > > [] kernel_init+0x0/0x2e6 > > > [] child_rip+0x0/0x12 > > > > someone is trying to call kref_get on a kobject that has not been > > initialized yet, which could be the reason the newer patches break > > something, as the pointers are not set up properly with a call to > > kobject_init() first. > > > > But, alloc_disk() should have been called on this gendisk for it to work > > properly at all, unless something is trashing that structure? > > > > I'm way confused... > > This patch, as found by Dave Young, should fix the issue: > > I'll roll it into my larger patchset so that Andrew will get it > automatically next release, but here it is for people to use now. > > thanks, > > greg k-h > > -------------- > > From: Greg Kroah-Hartman > Subject: fix bug with adding new block devices in -mm > > need to set the kset before initializing the kobject. > > > --- > block/genhd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/block/genhd.c > +++ b/block/genhd.c > @@ -718,9 +718,9 @@ struct gendisk *alloc_disk_node(int mino > } > } > disk->minors = minors; > - kobject_init(&disk->kobj); > disk->kobj.kset = block_kset; > disk->kobj.ktype = &ktype_block; > + kobject_init(&disk->kobj); > rand_initialize_disk(disk); > INIT_WORK(&disk->async_notify, > media_change_notify_thread); > > - Hi, Could you please add signed-off by me? Signed-off-by: Dave Young Regards dave