From: Linus Torvalds <torvalds@linux-foundation.org>
To: Larry Finger <Larry.Finger@lwfinger.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
WANG Cong <xiyou.wangcong@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>, Tejun Heo <tj@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] base firmware: Fix BUG from sysfs attributes change in commit a2db6842873c8e5a70652f278d469128cb52db70
Date: Sat, 13 Mar 2010 14:32:13 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.1003131426480.3719@i5.linux-foundation.org> (raw)
In-Reply-To: <4b9be956.x5+yAHXGDfXer810%Larry.Finger@lwfinger.net>
On Sat, 13 Mar 2010, Larry Finger wrote:
>
> Commit a2db6842873c8e5a70652f278d469128cb52db70 changed the way that
> sysfs attributes are handled. With lockdep checking enabled, a firmware
> loading request from b43 generates the following BUG:
>
> BUG: key ffff8800b85f4870 not in .data!
> ------------[ cut here ]------------
> WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x236/0x5d0()
I don't think we can fix these problems this way.
Lookie here:
[torvalds@i5 linux]$ git grep sysfs_create_bin_file | wc
68 319 5999
[torvalds@i5 linux]$ git grep sysfs_bin_attr_init | wc
8 24 522
and you sent in patches to fix _two_ of the remaining 60 cases.
Now, there may be some reason why it's not needed for the others, and
those two are special, but I somewhat doubt it.
Eric - that patch of yours is obviously broken. Either I need to revert
it, or you need to fix it. Not these kinds of "fix random
sysfs_create_bin_file() drivers one by one" things.
Linus
---
> Hardware name: HP Pavilion dv2700 Notebook PC
> Pid: 2283, comm: NetworkManager Not tainted 2.6.34-rc1-wl #320
> Call Trace:
> [<ffffffff81046068>] warn_slowpath_common+0x78/0xb0
> [<ffffffff810460af>] warn_slowpath_null+0xf/0x20
> [<ffffffff810765e6>] lockdep_init_map+0x236/0x5d0
> [<ffffffff811633aa>] sysfs_add_file_mode+0x6a/0xc0
> [<ffffffff8116340c>] sysfs_add_file+0xc/0x10
> [<ffffffff81165ae1>] sysfs_create_bin_file+0x21/0x30
> [<ffffffff8124f6b7>] _request_firmware+0x267/0x630
> [<ffffffff8124fb0e>] request_firmware+0xe/0x10
> [<ffffffffa04038d2>] b43_do_request_fw+0x92/0x230 [b43]
> (rest of dump snipped)
>
> Fixed by initing the attribute.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> Index: wireless-testing/drivers/base/firmware_class.c
> ===================================================================
> --- wireless-testing.orig/drivers/base/firmware_class.c
> +++ wireless-testing/drivers/base/firmware_class.c
> @@ -442,6 +442,7 @@ static int fw_setup_device(struct firmwa
> fw_priv = dev_get_drvdata(f_dev);
>
> fw_priv->fw = fw;
> + sysfs_bin_attr_init(&fw_priv->attr_data);
> retval = sysfs_create_bin_file(&f_dev->kobj, &fw_priv->attr_data);
> if (retval) {
> dev_err(device, "%s: sysfs_create_bin_file failed\n", __func__);
>
next prev parent reply other threads:[~2010-03-13 22:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-13 19:36 Larry Finger
2010-03-13 22:32 ` Linus Torvalds [this message]
2010-03-13 22:39 ` Jiri Kosina
2010-03-13 22:57 ` Linus Torvalds
2010-03-14 3:57 ` Eric W. Biederman
2010-03-14 5:46 ` Linus Torvalds
2010-03-14 6:59 ` Ingo Molnar
2010-03-14 17:20 ` Linus Torvalds
2010-03-14 18:11 ` Greg KH
2010-03-14 18:30 ` Eric W. Biederman
2010-03-14 18:38 ` Greg KH
2010-03-14 10:49 ` Wolfram Sang
2010-03-14 18:04 ` Linus Torvalds
2010-03-14 18:07 ` Linus Torvalds
2010-03-14 19:08 ` Eric W. Biederman
2010-03-15 0:48 ` Wolfram Sang
2010-03-15 0:20 ` Wolfram Sang
2010-03-15 0:29 ` [PATCH] init dynamic bin_attribute structures Wolfram Sang
2010-03-15 10:00 ` Jiri Kosina
2010-03-15 10:12 ` [rtc-linux] " Wolfram Sang
2010-03-15 18:47 ` Linus Torvalds
2010-03-13 22:55 ` [PATCH] base firmware: Fix BUG from sysfs attributes change in commit a2db6842873c8e5a70652f278d469128cb52db70 Larry Finger
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=alpine.LFD.2.00.1003131426480.3719@i5.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=xiyou.wangcong@gmail.com \
/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
Powered by JetHome