lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 13 Mar 2010 13:36:54 -0600
From:	Larry Finger <Larry.Finger@...inger.net>
To:	torvalds@...ux-foundation.org, ebiederm@...ssion.com
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] base firmware: Fix BUG from sysfs attributes change in
 commit a2db6842873c8e5a70652f278d469128cb52db70

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@...inger.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__);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists