From: Stephen Hemminger <shemminger@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: kernel BUG at fs/sysfs/symlink.c:87
Date: Tue, 25 Jan 2005 12:32:35 -0800 [thread overview]
Message-ID: <20050125123235.118108ca@dxpl.pdx.osdl.net> (raw)
In-Reply-To: <20050124155100.GA2583@paradigm.rfc822.org>
I can't reproduce this with 2.6.11-rc2, could you try this patch to
see if it matters.
Puzzled, because the assert is.
BUG_ON(!kobj || !kobj->dentry || !name);
and call is
err = sysfs_create_link(&p->kobj, &br->dev->class_dev.kobj,
SYSFS_BRIDGE_PORT_LINK);
kobj can't be NULL, because &p->kobj can't be NULL
kobj->dentry is created by kobject_add
name is SYSFS_BRIDGE_PORT_LINK ("bridge")
The kobj->dentry should have been created by kobject_add()
kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
p->kobj.ktype = &brport_ktype;
p->kobj.parent = &(p->dev->class_dev.kobj);
p->kobj.kset = NULL;
err = kobject_add(&p->kobj);
and kobject_add does.
err = create_dir(kobj);
create_dir calls sysfs_create_dir(kobj).
===================
Since kobject_register initializes more fields, perhaps some part of kobject_add
got confused. Try this.
diff -Nru a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
--- a/net/bridge/br_sysfs_if.c 2005-01-25 12:28:00 -08:00
+++ b/net/bridge/br_sysfs_if.c 2005-01-25 12:28:00 -08:00
@@ -229,7 +229,7 @@
p->kobj.parent = &(p->dev->class_dev.kobj);
p->kobj.kset = NULL;
- err = kobject_add(&p->kobj);
+ err = kobject_register(&p->kobj);
if(err)
goto out1;
prev parent reply other threads:[~2005-01-25 20:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 15:51 Florian Lohoff
2005-01-24 16:08 ` Jörn Engel
2005-01-24 16:28 ` Florian Lohoff
2005-01-24 17:04 ` Florian Lohoff
2005-01-25 11:31 ` Jörn Engel
2005-01-25 20:32 ` Stephen Hemminger [this message]
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=20050125123235.118108ca@dxpl.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®