All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base firmware: Fix BUG from sysfs attributes change in commit a2db6842873c8e5a70652f278d469128cb52db70
@ 2010-03-13 19:36 Larry Finger
  2010-03-13 22:32 ` Linus Torvalds
  0 siblings, 1 reply; 26+ messages in thread
From: Larry Finger @ 2010-03-13 19:36 UTC (permalink / raw)
  To: torvalds, ebiederm; +Cc: linux-kernel

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()
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__);

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-03-15 18:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13 19:36 [PATCH] base firmware: Fix BUG from sysfs attributes change in commit a2db6842873c8e5a70652f278d469128cb52db70 Larry Finger
2010-03-13 22:32 ` Linus Torvalds
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  0:29               ` Wolfram Sang
2010-03-15 10:00               ` Jiri Kosina
2010-03-15 10:00                 ` Jiri Kosina
2010-03-15 10:12                 ` [rtc-linux] " Wolfram Sang
2010-03-15 10:12                   ` Wolfram Sang
2010-03-15 18:47                 ` Linus Torvalds
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.