From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>,
linux-kernel@vger.kernel.org,
"Linux Kernel Network Developers" <netdev@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: 2.6.33 dies on modprobe
Date: Wed, 3 Mar 2010 16:58:12 +0800 [thread overview]
Message-ID: <2375c9f91003030058h7456b5e1odc8ca958f5af2c0d@mail.gmail.com> (raw)
In-Reply-To: <20100301090708.GF17929@forwiss.uni-passau.de>
[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]
On Mon, Mar 1, 2010 at 5:07 PM, M G Berberich
<berberic@fmi.uni-passau.de> wrote:
> Hello,
>
> Am Montag, den 01. März schrieb Américo Wang:
>> On Mon, Mar 1, 2010 at 6:12 AM, M G Berberich
>> <berberic@fmi.uni-passau.de> wrote:
>
>> > I tried to build a 2.6.33 kernel but on boot it dies on modprobe
>> > (kernel-Oops). This might be the result of faulty config, but I'm
>> > totaly clueless what's the fault.
>> >
>> > The kernel starts up fine and mounts the root-filesystem, but then
>> > dies on the first modprobe executed. I can boot it with init=/bin/bash
>> > and get a working bash (until I do modprobe on any module).
>> >
>> > System is a Gigabyte M55S-S3 rev 2.0 (nForce 550) with an AMD Athlon64
>> > X2 5000+ and amd64-kernel architecture. kernel-sources are from
>> > kernel.org.
>
>> It seems something is wrong with forcedeth code or PCI code.
>> Adding some Cc's.
>
> I don't think it's forcedeth. forcedeth just happens to be the first
> module that get's loaded in startup. It crashes with any other module
> too (I tried ohci_hcd).
>
Ok, below is my patch, I am not sure it could fix the BUG for you,
but it could fix the WARNING. But perhaps they are related.
Please give it a try.
--------------------->
It looks really odd that we do class_put() in non-failure path of
class_register(), shouldn't it be in class_unregister()?
In fact we have this problem long time ago, since commit 7c71448b,
but a recent change (commit 18d19c964) uncovers this.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
[-- Attachment #2: drivers-base-class_c-move-class_put.diff --]
[-- Type: text/plain, Size: 621 bytes --]
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 6e2c3b0..ccf312d 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -192,7 +192,6 @@ int __class_register(struct class *cls, struct lock_class_key *key)
return error;
}
error = add_class_attrs(class_get(cls));
- class_put(cls);
return error;
}
EXPORT_SYMBOL_GPL(__class_register);
@@ -200,6 +199,7 @@ EXPORT_SYMBOL_GPL(__class_register);
void class_unregister(struct class *cls)
{
pr_debug("device class '%s': unregistering\n", cls->name);
+ class_put(cls);
remove_class_attrs(cls);
kset_unregister(&cls->p->class_subsys);
}
next prev parent reply other threads:[~2010-03-03 8:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100228221257.GA8858@invalid>
2010-03-01 4:22 ` 2.6.33 dies on modprobe Américo Wang
2010-03-01 9:07 ` M G Berberich
2010-03-03 8:58 ` Américo Wang [this message]
2010-03-03 9:08 ` Américo Wang
2010-03-03 9:18 ` Américo Wang
2010-03-03 2:52 ` Andrew Morton
2010-03-03 22:16 ` M G Berberich
2010-03-03 22:24 ` Andrew Morton
2010-03-04 0:05 ` Andrew Morton
2010-03-04 0:10 ` Randy Dunlap
[not found] <fa.S/rvLm1aQlDSqPwVJz5B+5vHjbM@ifi.uio.no>
[not found] ` <fa.+Pg2gFpQSg5k/1mCpBdt8xMXeqY@ifi.uio.no>
[not found] ` <fa.0/xGeZctWXDyX0DAp6opgP1HP7w@ifi.uio.no>
[not found] ` <fa.kPSENj9DWu0Q8xolQMDkRvAwxQ0@ifi.uio.no>
[not found] ` <fa.JUJQsT7bECqtd8JSoNY+SBdASCE@ifi.uio.no>
[not found] ` <fa.Lya/54V1PJgwjc8uy1Yk4NyYUh4@ifi.uio.no>
2010-03-03 23:04 ` M G Berberich
2010-03-04 15:30 ` Américo Wang
2010-03-04 20:38 ` M G Berberich
2010-03-07 15:41 ` Américo Wang
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=2375c9f91003030058h7456b5e1odc8ca958f5af2c0d@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).