From patchwork Wed Mar 3 22:24:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 46877 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 64E60B7CF0 for ; Thu, 4 Mar 2010 09:24:42 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756935Ab0CCWYh (ORCPT ); Wed, 3 Mar 2010 17:24:37 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:58125 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756394Ab0CCWYf (ORCPT ); Wed, 3 Mar 2010 17:24:35 -0500 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id o23MOKTr021971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Mar 2010 14:24:21 -0800 Received: from akpm.mtv.corp.google.com (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id o23MOKSB002406; Wed, 3 Mar 2010 14:24:20 -0800 Date: Wed, 3 Mar 2010 14:24:20 -0800 From: Andrew Morton To: M G Berberich Cc: =?ISO-8859-1?Q?Am=E9rico?= Wang , linux-kernel@vger.kernel.org, Linux Kernel Network Developers Subject: Re: 2.6.33 dies on modprobe Message-Id: <20100303142420.accf985e.akpm@linux-foundation.org> In-Reply-To: <20100303221602.GA3264@invalid> References: <20100228221257.GA8858@invalid> <2375c9f91002282022n29e83858jd8cadbb2e664b436@mail.gmail.com> <20100302185213.43a1a0d7.akpm@linux-foundation.org> <20100303221602.GA3264@invalid> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Spam-Status: No, hits=-3.018 required=5 tests=AWL,BAYES_00 X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 3 Mar 2010 23:16:02 +0100 M G Berberich wrote: > Hello, > > Am Dienstag, den 02. M__rz schrieb Andrew Morton: > > > It could be that some kobject on that list has become invalid (memory > > was freed, module was unloaded, etc) and later code stumbled across the > > now-invalid object on that list and then crashed. > > > > What we can do to find this is to add a diagnostic each time an object > > is registered, and a diagnostic each time kset_find_obj() looks at the > > objects. Then we'll see which kobject caused the crash, then we can > > look back and see where that kobject was registered from. > > [...] > > > This will generate a lot of output and we don't want to lose any of it. > > I'd suggest setting up netconsole so all the output can be reliably > > saved: Documentation/networking/netconsole.txt > > I have a serial connection to a netbook. Log attached. drat, my patch didn't work. Can you try this one please? --- a/lib/kobject.c~a +++ a/lib/kobject.c @@ -126,6 +126,8 @@ static void kobj_kset_join(struct kobjec kset_get(kobj->kset); spin_lock(&kobj->kset->list_lock); + printk("kobj_kset_join:%p\n", kobj); + dump_stack(); list_add_tail(&kobj->entry, &kobj->kset->list); spin_unlock(&kobj->kset->list_lock); } @@ -751,9 +753,12 @@ struct kobject *kset_find_obj(struct kse spin_lock(&kset->list_lock); list_for_each_entry(k, &kset->list, entry) { - if (kobject_name(k) && !strcmp(kobject_name(k), name)) { - ret = kobject_get(k); - break; + if (kobject_name(k)) { + printk("kset_find_obj:%p\n", k); + if (!strcmp(kobject_name(k), name)) { + ret = kobject_get(k); + break; + } } } spin_unlock(&kset->list_lock);