* 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
@ 2010-03-08 23:47 Alexander Beregalov
2010-03-09 0:12 ` Yinghai Lu
0 siblings, 1 reply; 16+ messages in thread
From: Alexander Beregalov @ 2010-03-08 23:47 UTC (permalink / raw)
To: linux-acpi, Linux Kernel Mailing List
Hi
Kernel version is 2.6.34-rc1
bus: 'acpi': add driver processor
bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
device: 'cooling_device0': device_add
driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
bus: 'acpi': add driver thermal
bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
bus: 'acpi': driver_probe_device: matched device LNXTHERM:01 with driver thermal
bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:01
device: 'thermal_zone0': device_add
BUG: key f71f0168 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x16f/0x4f0()
Hardware name:
Modules linked in:
Pid: 1, comm: swapper Not tainted 2.6.34-rc1 #1
Call Trace:
[<c1351758>] ? printk+0x18/0x20
[<c102aa5d>] warn_slowpath_common+0x6d/0xa0
[<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
[<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
[<c1001000>] ? do_one_initcall+0x0/0x190
[<c102aaa5>] warn_slowpath_null+0x15/0x20
[<c104e9af>] lockdep_init_map+0x16f/0x4f0
[<c10dcd98>] sysfs_add_file_mode+0x58/0xb0
[<c10dce03>] sysfs_add_file+0x13/0x20
Switched to NOHz mode on CPU #0
[<c10dcec6>] sysfs_create_file+0x26/0x30
[<c1247ab3>] device_create_file+0x13/0x20
[<c12c5bd4>] thermal_zone_bind_cooling_device+0x1e4/0x2f0
[<c11feb35>] ? acpi_bus_data_handler+0x0/0x5
[<c121ed40>] acpi_thermal_cooling_device_cb+0x70/0x11e
[<c12c5780>] ? thermal_zone_device_register+0x260/0x400
[<c12c59f0>] ? thermal_zone_bind_cooling_device+0x0/0x2f0
[<c121ee0a>] acpi_thermal_bind_cooling_device+0xd/0xf
[<c12c57f9>] thermal_zone_device_register+0x2d9/0x400
[<c121ef82>] acpi_thermal_add+0x176/0x398
[<c10de301>] ? sysfs_do_create_link+0xa1/0x140
[<c11fec0f>] acpi_device_probe+0x3a/0xf4
[<c124a097>] driver_probe_device+0xb7/0x1b0
[<c124a219>] __driver_attach+0x89/0x90
[<c12498b8>] bus_for_each_dev+0x48/0x70
[<c1249e79>] driver_attach+0x19/0x20
[<c124a190>] ? __driver_attach+0x0/0x90
[<c124922b>] bus_add_driver+0xcb/0x230
[<c11feb45>] ? acpi_device_remove+0x0/0x90
[<c124a495>] driver_register+0x65/0x110
[<c162119a>] ? kernel_init+0x0/0x120
[<c10d6bd3>] ? proc_mkdir_mode+0x33/0x50
[<c162119a>] ? kernel_init+0x0/0x120
[<c11ffebb>] acpi_bus_register_driver+0x3a/0x3f
[<c1639062>] acpi_thermal_init+0x50/0x6f
[<c100102d>] do_one_initcall+0x2d/0x190
[<c162119a>] ? kernel_init+0x0/0x120
[<c1639012>] ? acpi_thermal_init+0x0/0x6f
[<c162119a>] ? kernel_init+0x0/0x120
[<c1621221>] kernel_init+0x87/0x120
[<c1002fba>] kernel_thread_helper+0x6/0x1c
---[ end trace a7919e7f17c0a725 ]---
thermal LNXTHERM:01: registered as thermal_zone0
ACPI: Thermal Zone [THRM] (39 C)
driver: 'LNXTHERM:01': driver_bound: bound to device 'thermal'
bus: 'acpi': really_probe: bound device LNXTHERM:01 to driver thermal
CONFIG_ACPI=y
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_PROCFS_POWER is not set
# CONFIG_ACPI_POWER_METER is not set
# CONFIG_ACPI_SYSFS_POWER is not set
# CONFIG_ACPI_PROC_EVENT is not set
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not set
# CONFIG_ACPI_BUTTON is not set
# CONFIG_ACPI_FAN is not set
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
# CONFIG_ACPI_CONTAINER is not set
# CONFIG_ACPI_SBS is not set
# CONFIG_X86_ACPI_CPUFREQ is not set
CONFIG_PNPACPI=y
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-08 23:47 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data! Alexander Beregalov
@ 2010-03-09 0:12 ` Yinghai Lu
2010-03-09 0:32 ` Yinghai Lu
2010-03-09 0:35 ` Eric W. Biederman
0 siblings, 2 replies; 16+ messages in thread
From: Yinghai Lu @ 2010-03-09 0:12 UTC (permalink / raw)
To: Alexander Beregalov, Eric W. Biederman, Greg KH
Cc: linux-acpi, Linux Kernel Mailing List
On Mon, Mar 8, 2010 at 3:47 PM, Alexander Beregalov
<a.beregalov@gmail.com> wrote:
> Hi
>
> Kernel version is 2.6.34-rc1
>
> bus: 'acpi': add driver processor
> bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
> bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
> device: 'cooling_device0': device_add
> driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
> bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
> bus: 'acpi': add driver thermal
> bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
> bus: 'acpi': driver_probe_device: matched device LNXTHERM:01 with driver thermal
> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:01
> device: 'thermal_zone0': device_add
> BUG: key f71f0168 not in .data!
> ------------[ cut here ]------------
> WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x16f/0x4f0()
> Hardware name:
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.34-rc1 #1
> Call Trace:
> [<c1351758>] ? printk+0x18/0x20
> [<c102aa5d>] warn_slowpath_common+0x6d/0xa0
> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
> [<c1001000>] ? do_one_initcall+0x0/0x190
> [<c102aaa5>] warn_slowpath_null+0x15/0x20
> [<c104e9af>] lockdep_init_map+0x16f/0x4f0
> [<c10dcd98>] sysfs_add_file_mode+0x58/0xb0
> [<c10dce03>] sysfs_add_file+0x13/0x20
> Switched to NOHz mode on CPU #0
> [<c10dcec6>] sysfs_create_file+0x26/0x30
> [<c1247ab3>] device_create_file+0x13/0x20
> [<c12c5bd4>] thermal_zone_bind_cooling_device+0x1e4/0x2f0
> [<c11feb35>] ? acpi_bus_data_handler+0x0/0x5
> [<c121ed40>] acpi_thermal_cooling_device_cb+0x70/0x11e
> [<c12c5780>] ? thermal_zone_device_register+0x260/0x400
> [<c12c59f0>] ? thermal_zone_bind_cooling_device+0x0/0x2f0
> [<c121ee0a>] acpi_thermal_bind_cooling_device+0xd/0xf
> [<c12c57f9>] thermal_zone_device_register+0x2d9/0x400
> [<c121ef82>] acpi_thermal_add+0x176/0x398
> [<c10de301>] ? sysfs_do_create_link+0xa1/0x140
> [<c11fec0f>] acpi_device_probe+0x3a/0xf4
> [<c124a097>] driver_probe_device+0xb7/0x1b0
> [<c124a219>] __driver_attach+0x89/0x90
> [<c12498b8>] bus_for_each_dev+0x48/0x70
> [<c1249e79>] driver_attach+0x19/0x20
> [<c124a190>] ? __driver_attach+0x0/0x90
> [<c124922b>] bus_add_driver+0xcb/0x230
> [<c11feb45>] ? acpi_device_remove+0x0/0x90
> [<c124a495>] driver_register+0x65/0x110
> [<c162119a>] ? kernel_init+0x0/0x120
> [<c10d6bd3>] ? proc_mkdir_mode+0x33/0x50
> [<c162119a>] ? kernel_init+0x0/0x120
> [<c11ffebb>] acpi_bus_register_driver+0x3a/0x3f
> [<c1639062>] acpi_thermal_init+0x50/0x6f
> [<c100102d>] do_one_initcall+0x2d/0x190
> [<c162119a>] ? kernel_init+0x0/0x120
> [<c1639012>] ? acpi_thermal_init+0x0/0x6f
> [<c162119a>] ? kernel_init+0x0/0x120
> [<c1621221>] kernel_init+0x87/0x120
> [<c1002fba>] kernel_thread_helper+0x6/0x1c
> ---[ end trace a7919e7f17c0a725 ]---
got
[ 145.239329] BUG: key ffff88206fe99c58 not in .data!
[ 145.244994] ------------[ cut here ]------------
[ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
[ 145.262424] Hardware name: Sun Fire x4800
[ 145.267543] Modules linked in:
[ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
[ 145.285140] Call Trace:
[ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
[ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
[ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
[ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
[ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
[ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
[ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
[ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
[ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
[ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
[ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
[ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
[ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
[ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
[ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
[ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
[ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
[ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
[ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
[ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
[ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
[ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 0:12 ` Yinghai Lu
@ 2010-03-09 0:32 ` Yinghai Lu
2010-03-09 0:40 ` Américo Wang
2010-03-09 0:35 ` Eric W. Biederman
1 sibling, 1 reply; 16+ messages in thread
From: Yinghai Lu @ 2010-03-09 0:32 UTC (permalink / raw)
To: Alexander Beregalov, Eric W. Biederman, Greg KH, Linus Torvalds
Cc: linux-acpi, Linux Kernel Mailing List
> [ 145.239329] BUG: key ffff88206fe99c58 not in .data!
> [ 145.244994] ------------[ cut here ]------------
> [ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
> [ 145.267543] Modules linked in:
> [ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
> [ 145.285140] Call Trace:
> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
related to ?
commit a2db6842873c8e5a70652f278d469128cb52db70
Author: Eric W. Biederman <ebiederm@xmission.com>
Date: Thu Feb 11 15:20:00 2010 -0800
sysfs: Only take active references on attributes.
If we exclude directories and symlinks from the set of sysfs
dirents where we need active references we are left with
sysfs attributes (binary or not).
- Tweak sysfs_deactivate to only do something on attributes
- Move lockdep initialization into sysfs_file_add_mode to
limit it to just attributes.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 0:12 ` Yinghai Lu
2010-03-09 0:32 ` Yinghai Lu
@ 2010-03-09 0:35 ` Eric W. Biederman
2010-03-09 7:06 ` Yinghai Lu
1 sibling, 1 reply; 16+ messages in thread
From: Eric W. Biederman @ 2010-03-09 0:35 UTC (permalink / raw)
To: Yinghai Lu
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
Yinghai Lu <yinghai@kernel.org> writes:
Yep this looks like a couple more cases of drivers that don't
statically declare and allocate their sysfs attributes.
The ipmi driver looks like it just wants to waste memory.
I haven't made sense of the thermal driver yet.
Something like the untested patch below should fix the impi driver.
Eric
> On Mon, Mar 8, 2010 at 3:47 PM, Alexander Beregalov
> <a.beregalov@gmail.com> wrote:
>> Hi
>>
>> Kernel version is 2.6.34-rc1
>>
>> bus: 'acpi': add driver processor
>> bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
>> bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
>> device: 'cooling_device0': device_add
>> driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
>> bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
>> bus: 'acpi': add driver thermal
>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:01 with driver thermal
>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:01
>> device: 'thermal_zone0': device_add
>> BUG: key f71f0168 not in .data!
>> ------------[ cut here ]------------
>> WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x16f/0x4f0()
>> Hardware name:
>> Modules linked in:
>> Pid: 1, comm: swapper Not tainted 2.6.34-rc1 #1
>> Call Trace:
>> [<c1351758>] ? printk+0x18/0x20
>> [<c102aa5d>] warn_slowpath_common+0x6d/0xa0
>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>> [<c1001000>] ? do_one_initcall+0x0/0x190
>> [<c102aaa5>] warn_slowpath_null+0x15/0x20
>> [<c104e9af>] lockdep_init_map+0x16f/0x4f0
>> [<c10dcd98>] sysfs_add_file_mode+0x58/0xb0
>> [<c10dce03>] sysfs_add_file+0x13/0x20
>> Switched to NOHz mode on CPU #0
>> [<c10dcec6>] sysfs_create_file+0x26/0x30
>> [<c1247ab3>] device_create_file+0x13/0x20
>> [<c12c5bd4>] thermal_zone_bind_cooling_device+0x1e4/0x2f0
>> [<c11feb35>] ? acpi_bus_data_handler+0x0/0x5
>> [<c121ed40>] acpi_thermal_cooling_device_cb+0x70/0x11e
>> [<c12c5780>] ? thermal_zone_device_register+0x260/0x400
>> [<c12c59f0>] ? thermal_zone_bind_cooling_device+0x0/0x2f0
>> [<c121ee0a>] acpi_thermal_bind_cooling_device+0xd/0xf
>> [<c12c57f9>] thermal_zone_device_register+0x2d9/0x400
>> [<c121ef82>] acpi_thermal_add+0x176/0x398
>> [<c10de301>] ? sysfs_do_create_link+0xa1/0x140
>> [<c11fec0f>] acpi_device_probe+0x3a/0xf4
>> [<c124a097>] driver_probe_device+0xb7/0x1b0
>> [<c124a219>] __driver_attach+0x89/0x90
>> [<c12498b8>] bus_for_each_dev+0x48/0x70
>> [<c1249e79>] driver_attach+0x19/0x20
>> [<c124a190>] ? __driver_attach+0x0/0x90
>> [<c124922b>] bus_add_driver+0xcb/0x230
>> [<c11feb45>] ? acpi_device_remove+0x0/0x90
>> [<c124a495>] driver_register+0x65/0x110
>> [<c162119a>] ? kernel_init+0x0/0x120
>> [<c10d6bd3>] ? proc_mkdir_mode+0x33/0x50
>> [<c162119a>] ? kernel_init+0x0/0x120
>> [<c11ffebb>] acpi_bus_register_driver+0x3a/0x3f
>> [<c1639062>] acpi_thermal_init+0x50/0x6f
>> [<c100102d>] do_one_initcall+0x2d/0x190
>> [<c162119a>] ? kernel_init+0x0/0x120
>> [<c1639012>] ? acpi_thermal_init+0x0/0x6f
>> [<c162119a>] ? kernel_init+0x0/0x120
>> [<c1621221>] kernel_init+0x87/0x120
>> [<c1002fba>] kernel_thread_helper+0x6/0x1c
>> ---[ end trace a7919e7f17c0a725 ]---
>
>
> got
>
> [ 145.239329] BUG: key ffff88206fe99c58 not in .data!
> [ 145.244994] ------------[ cut here ]------------
> [ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
> [ 145.262424] Hardware name: Sun Fire x4800
> [ 145.267543] Modules linked in:
> [ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
> [ 145.285140] Call Trace:
> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index ec5e3f8..16e9073 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2272,42 +2272,52 @@ static int create_files(struct bmc_device *bmc)
bmc->device_id_attr.attr.name = "device_id";
bmc->device_id_attr.attr.mode = S_IRUGO;
bmc->device_id_attr.show = device_id_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs";
bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO;
bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->revision_attr.attr.name = "revision";
bmc->revision_attr.attr.mode = S_IRUGO;
bmc->revision_attr.show = revision_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->firmware_rev_attr.attr.name = "firmware_revision";
bmc->firmware_rev_attr.attr.mode = S_IRUGO;
bmc->firmware_rev_attr.show = firmware_rev_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->version_attr.attr.name = "ipmi_version";
bmc->version_attr.attr.mode = S_IRUGO;
bmc->version_attr.show = ipmi_version_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->add_dev_support_attr.attr.name = "additional_device_support";
bmc->add_dev_support_attr.attr.mode = S_IRUGO;
bmc->add_dev_support_attr.show = add_dev_support_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->manufacturer_id_attr.attr.name = "manufacturer_id";
bmc->manufacturer_id_attr.attr.mode = S_IRUGO;
bmc->manufacturer_id_attr.show = manufacturer_id_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->product_id_attr.attr.name = "product_id";
bmc->product_id_attr.attr.mode = S_IRUGO;
bmc->product_id_attr.show = product_id_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->guid_attr.attr.name = "guid";
bmc->guid_attr.attr.mode = S_IRUGO;
bmc->guid_attr.show = guid_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision";
bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO;
bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
err = device_create_file(&bmc->dev->dev,
&bmc->device_id_attr);
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 0:32 ` Yinghai Lu
@ 2010-03-09 0:40 ` Américo Wang
0 siblings, 0 replies; 16+ messages in thread
From: Américo Wang @ 2010-03-09 0:40 UTC (permalink / raw)
To: Yinghai Lu
Cc: Alexander Beregalov, Eric W. Biederman, Greg KH, Linus Torvalds,
linux-acpi, Linux Kernel Mailing List
On Mon, Mar 08, 2010 at 04:32:36PM -0800, Yinghai Lu wrote:
>> [ 145.239329] BUG: key ffff88206fe99c58 not in .data!
>> [ 145.244994] ------------[ cut here ]------------
>> [ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
>> [ 145.267543] Modules linked in:
>> [ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
>> [ 145.285140] Call Trace:
>> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
>> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
>> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
>> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
>> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
>> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
>> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
>> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
>> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
>> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
>> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
>> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
>> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
>> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
>> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
>> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
>> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
>> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
>> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
>> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
>> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
>> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
>
>related to ?
>commit a2db6842873c8e5a70652f278d469128cb52db70
Yes. Need to add sysfs_attr_init() or sysfs_bin_attr_init() in the
driver code.
--
Live like a child, think like the god.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 0:35 ` Eric W. Biederman
@ 2010-03-09 7:06 ` Yinghai Lu
2010-03-09 7:57 ` Eric W. Biederman
2010-03-09 7:57 ` Eric W. Biederman
0 siblings, 2 replies; 16+ messages in thread
From: Yinghai Lu @ 2010-03-09 7:06 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
On 03/08/2010 04:35 PM, Eric W. Biederman wrote:
> Yinghai Lu <yinghai@kernel.org> writes:
>
> Yep this looks like a couple more cases of drivers that don't
> statically declare and allocate their sysfs attributes.
> The ipmi driver looks like it just wants to waste memory.
> I haven't made sense of the thermal driver yet.
>
> Something like the untested patch below should fix the impi driver.
>
>
> Eric
>
>> On Mon, Mar 8, 2010 at 3:47 PM, Alexander Beregalov
>> <a.beregalov@gmail.com> wrote:
>>> Hi
>>>
>>> Kernel version is 2.6.34-rc1
>>>
>>> bus: 'acpi': add driver processor
>>> bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
>>> bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
>>> device: 'cooling_device0': device_add
>>> driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
>>> bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
>>> bus: 'acpi': add driver thermal
>>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
>>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
>>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:01 with driver thermal
>>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:01
>>> device: 'thermal_zone0': device_add
>>> BUG: key f71f0168 not in .data!
>>> ------------[ cut here ]------------
>>> WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x16f/0x4f0()
>>> Hardware name:
>>> Modules linked in:
>>> Pid: 1, comm: swapper Not tainted 2.6.34-rc1 #1
>>> Call Trace:
>>> [<c1351758>] ? printk+0x18/0x20
>>> [<c102aa5d>] warn_slowpath_common+0x6d/0xa0
>>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>>> [<c1001000>] ? do_one_initcall+0x0/0x190
>>> [<c102aaa5>] warn_slowpath_null+0x15/0x20
>>> [<c104e9af>] lockdep_init_map+0x16f/0x4f0
>>> [<c10dcd98>] sysfs_add_file_mode+0x58/0xb0
>>> [<c10dce03>] sysfs_add_file+0x13/0x20
>>> Switched to NOHz mode on CPU #0
>>> [<c10dcec6>] sysfs_create_file+0x26/0x30
>>> [<c1247ab3>] device_create_file+0x13/0x20
>>> [<c12c5bd4>] thermal_zone_bind_cooling_device+0x1e4/0x2f0
>>> [<c11feb35>] ? acpi_bus_data_handler+0x0/0x5
>>> [<c121ed40>] acpi_thermal_cooling_device_cb+0x70/0x11e
>>> [<c12c5780>] ? thermal_zone_device_register+0x260/0x400
>>> [<c12c59f0>] ? thermal_zone_bind_cooling_device+0x0/0x2f0
>>> [<c121ee0a>] acpi_thermal_bind_cooling_device+0xd/0xf
>>> [<c12c57f9>] thermal_zone_device_register+0x2d9/0x400
>>> [<c121ef82>] acpi_thermal_add+0x176/0x398
>>> [<c10de301>] ? sysfs_do_create_link+0xa1/0x140
>>> [<c11fec0f>] acpi_device_probe+0x3a/0xf4
>>> [<c124a097>] driver_probe_device+0xb7/0x1b0
>>> [<c124a219>] __driver_attach+0x89/0x90
>>> [<c12498b8>] bus_for_each_dev+0x48/0x70
>>> [<c1249e79>] driver_attach+0x19/0x20
>>> [<c124a190>] ? __driver_attach+0x0/0x90
>>> [<c124922b>] bus_add_driver+0xcb/0x230
>>> [<c11feb45>] ? acpi_device_remove+0x0/0x90
>>> [<c124a495>] driver_register+0x65/0x110
>>> [<c162119a>] ? kernel_init+0x0/0x120
>>> [<c10d6bd3>] ? proc_mkdir_mode+0x33/0x50
>>> [<c162119a>] ? kernel_init+0x0/0x120
>>> [<c11ffebb>] acpi_bus_register_driver+0x3a/0x3f
>>> [<c1639062>] acpi_thermal_init+0x50/0x6f
>>> [<c100102d>] do_one_initcall+0x2d/0x190
>>> [<c162119a>] ? kernel_init+0x0/0x120
>>> [<c1639012>] ? acpi_thermal_init+0x0/0x6f
>>> [<c162119a>] ? kernel_init+0x0/0x120
>>> [<c1621221>] kernel_init+0x87/0x120
>>> [<c1002fba>] kernel_thread_helper+0x6/0x1c
>>> ---[ end trace a7919e7f17c0a725 ]---
>>
>>
>> got
>>
>> [ 145.239329] BUG: key ffff88206fe99c58 not in .data!
>> [ 145.244994] ------------[ cut here ]------------
>> [ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
>> [ 145.262424] Hardware name: Sun Fire x4800
>> [ 145.267543] Modules linked in:
>> [ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
>> [ 145.285140] Call Trace:
>> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
>> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
>> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
>> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
>> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
>> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
>> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
>> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
>> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
>> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
>> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
>> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
>> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
>> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
>> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
>> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
>> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
>> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
>> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
>> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
>> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
>> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
>
> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
> index ec5e3f8..16e9073 100644
> --- a/drivers/char/ipmi/ipmi_msghandler.c
> +++ b/drivers/char/ipmi/ipmi_msghandler.c
> @@ -2272,42 +2272,52 @@ static int create_files(struct bmc_device *bmc)
> bmc->device_id_attr.attr.name = "device_id";
> bmc->device_id_attr.attr.mode = S_IRUGO;
> bmc->device_id_attr.show = device_id_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs";
> bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO;
> bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->revision_attr.attr.name = "revision";
> bmc->revision_attr.attr.mode = S_IRUGO;
> bmc->revision_attr.show = revision_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->firmware_rev_attr.attr.name = "firmware_revision";
> bmc->firmware_rev_attr.attr.mode = S_IRUGO;
> bmc->firmware_rev_attr.show = firmware_rev_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->version_attr.attr.name = "ipmi_version";
> bmc->version_attr.attr.mode = S_IRUGO;
> bmc->version_attr.show = ipmi_version_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->add_dev_support_attr.attr.name = "additional_device_support";
> bmc->add_dev_support_attr.attr.mode = S_IRUGO;
> bmc->add_dev_support_attr.show = add_dev_support_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->manufacturer_id_attr.attr.name = "manufacturer_id";
> bmc->manufacturer_id_attr.attr.mode = S_IRUGO;
> bmc->manufacturer_id_attr.show = manufacturer_id_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->product_id_attr.attr.name = "product_id";
> bmc->product_id_attr.attr.mode = S_IRUGO;
> bmc->product_id_attr.show = product_id_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->guid_attr.attr.name = "guid";
> bmc->guid_attr.attr.mode = S_IRUGO;
> bmc->guid_attr.show = guid_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision";
> bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO;
> bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show;
> + sysfs_attr_init(&bmc->device_id_attr.attr);
>
> err = device_create_file(&bmc->dev->dev,
> &bmc->device_id_attr);
still have bunch of that BUG...
YH
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 7:06 ` Yinghai Lu
@ 2010-03-09 7:57 ` Eric W. Biederman
2010-03-09 7:57 ` Eric W. Biederman
1 sibling, 0 replies; 16+ messages in thread
From: Eric W. Biederman @ 2010-03-09 7:57 UTC (permalink / raw)
To: Yinghai Lu
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
Yinghai Lu <yinghai@kernel.org> writes:
> On 03/08/2010 04:35 PM, Eric W. Biederman wrote:
>> Yinghai Lu <yinghai@kernel.org> writes:
>>
>> Yep this looks like a couple more cases of drivers that don't
>> statically declare and allocate their sysfs attributes.
>> The ipmi driver looks like it just wants to waste memory.
>> I haven't made sense of the thermal driver yet.
>>
>> Something like the untested patch below should fix the impi driver.
>>
>>
>> Eric
>>
>>> On Mon, Mar 8, 2010 at 3:47 PM, Alexander Beregalov
>>> <a.beregalov@gmail.com> wrote:
>>>> Hi
>>>>
>>>> Kernel version is 2.6.34-rc1
>>>>
>>>> bus: 'acpi': add driver processor
>>>> bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
>>>> bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
>>>> device: 'cooling_device0': device_add
>>>> driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
>>>> bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
>>>> bus: 'acpi': add driver thermal
>>>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
>>>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
>>>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:01 with driver thermal
>>>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:01
>>>> device: 'thermal_zone0': device_add
>>>> BUG: key f71f0168 not in .data!
>>>> ------------[ cut here ]------------
>>>> WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x16f/0x4f0()
>>>> Hardware name:
>>>> Modules linked in:
>>>> Pid: 1, comm: swapper Not tainted 2.6.34-rc1 #1
>>>> Call Trace:
>>>> [<c1351758>] ? printk+0x18/0x20
>>>> [<c102aa5d>] warn_slowpath_common+0x6d/0xa0
>>>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>>>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>>>> [<c1001000>] ? do_one_initcall+0x0/0x190
>>>> [<c102aaa5>] warn_slowpath_null+0x15/0x20
>>>> [<c104e9af>] lockdep_init_map+0x16f/0x4f0
>>>> [<c10dcd98>] sysfs_add_file_mode+0x58/0xb0
>>>> [<c10dce03>] sysfs_add_file+0x13/0x20
>>>> Switched to NOHz mode on CPU #0
>>>> [<c10dcec6>] sysfs_create_file+0x26/0x30
>>>> [<c1247ab3>] device_create_file+0x13/0x20
>>>> [<c12c5bd4>] thermal_zone_bind_cooling_device+0x1e4/0x2f0
>>>> [<c11feb35>] ? acpi_bus_data_handler+0x0/0x5
>>>> [<c121ed40>] acpi_thermal_cooling_device_cb+0x70/0x11e
>>>> [<c12c5780>] ? thermal_zone_device_register+0x260/0x400
>>>> [<c12c59f0>] ? thermal_zone_bind_cooling_device+0x0/0x2f0
>>>> [<c121ee0a>] acpi_thermal_bind_cooling_device+0xd/0xf
>>>> [<c12c57f9>] thermal_zone_device_register+0x2d9/0x400
>>>> [<c121ef82>] acpi_thermal_add+0x176/0x398
>>>> [<c10de301>] ? sysfs_do_create_link+0xa1/0x140
>>>> [<c11fec0f>] acpi_device_probe+0x3a/0xf4
>>>> [<c124a097>] driver_probe_device+0xb7/0x1b0
>>>> [<c124a219>] __driver_attach+0x89/0x90
>>>> [<c12498b8>] bus_for_each_dev+0x48/0x70
>>>> [<c1249e79>] driver_attach+0x19/0x20
>>>> [<c124a190>] ? __driver_attach+0x0/0x90
>>>> [<c124922b>] bus_add_driver+0xcb/0x230
>>>> [<c11feb45>] ? acpi_device_remove+0x0/0x90
>>>> [<c124a495>] driver_register+0x65/0x110
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c10d6bd3>] ? proc_mkdir_mode+0x33/0x50
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c11ffebb>] acpi_bus_register_driver+0x3a/0x3f
>>>> [<c1639062>] acpi_thermal_init+0x50/0x6f
>>>> [<c100102d>] do_one_initcall+0x2d/0x190
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c1639012>] ? acpi_thermal_init+0x0/0x6f
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c1621221>] kernel_init+0x87/0x120
>>>> [<c1002fba>] kernel_thread_helper+0x6/0x1c
>>>> ---[ end trace a7919e7f17c0a725 ]---
>>>
>>>
>>> got
>>>
>>> [ 145.239329] BUG: key ffff88206fe99c58 not in .data!
>>> [ 145.244994] ------------[ cut here ]------------
>>> [ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
>>> [ 145.262424] Hardware name: Sun Fire x4800
>>> [ 145.267543] Modules linked in:
>>> [ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
>>> [ 145.285140] Call Trace:
>>> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
>>> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
>>> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
>>> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
>>> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
>>> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
>>> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
>>> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
>>> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
>>> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
>>> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
>>> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
>>> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
>>> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
>>> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
>>> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
>>> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
>>> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
>>> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
>>> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
>>> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
>>> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
>>
>> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
>> index ec5e3f8..16e9073 100644
>> --- a/drivers/char/ipmi/ipmi_msghandler.c
>> +++ b/drivers/char/ipmi/ipmi_msghandler.c
>> @@ -2272,42 +2272,52 @@ static int create_files(struct bmc_device *bmc)
>> bmc->device_id_attr.attr.name = "device_id";
>> bmc->device_id_attr.attr.mode = S_IRUGO;
>> bmc->device_id_attr.show = device_id_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs";
>> bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO;
>> bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->revision_attr.attr.name = "revision";
>> bmc->revision_attr.attr.mode = S_IRUGO;
>> bmc->revision_attr.show = revision_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->firmware_rev_attr.attr.name = "firmware_revision";
>> bmc->firmware_rev_attr.attr.mode = S_IRUGO;
>> bmc->firmware_rev_attr.show = firmware_rev_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->version_attr.attr.name = "ipmi_version";
>> bmc->version_attr.attr.mode = S_IRUGO;
>> bmc->version_attr.show = ipmi_version_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->add_dev_support_attr.attr.name = "additional_device_support";
>> bmc->add_dev_support_attr.attr.mode = S_IRUGO;
>> bmc->add_dev_support_attr.show = add_dev_support_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->manufacturer_id_attr.attr.name = "manufacturer_id";
>> bmc->manufacturer_id_attr.attr.mode = S_IRUGO;
>> bmc->manufacturer_id_attr.show = manufacturer_id_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->product_id_attr.attr.name = "product_id";
>> bmc->product_id_attr.attr.mode = S_IRUGO;
>> bmc->product_id_attr.show = product_id_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->guid_attr.attr.name = "guid";
>> bmc->guid_attr.attr.mode = S_IRUGO;
>> bmc->guid_attr.show = guid_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision";
>> bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO;
>> bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> err = device_create_file(&bmc->dev->dev,
>> &bmc->device_id_attr);
>
> still have bunch of that BUG...
I expect if you look the backtrace will be different.
There are real issues here, I just don't know how to find them
without bug reports, or volunteers helping me to fix them.
But the fixes are trivial, there is no problem if you disable lockdep,
and the machine still runs with lockdep enabled.
Which ultimately means that lockdep can finally report errors between
sysfs and files and locking reasonably accurately.
If you would be so kind and help by posting the back traces so we can
find the handful of places left that dynamically allocate their sysfs
attributes that would be very much appreciated.
Eric
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 7:06 ` Yinghai Lu
2010-03-09 7:57 ` Eric W. Biederman
@ 2010-03-09 7:57 ` Eric W. Biederman
2010-03-12 2:29 ` Yinghai Lu
1 sibling, 1 reply; 16+ messages in thread
From: Eric W. Biederman @ 2010-03-09 7:57 UTC (permalink / raw)
To: Yinghai Lu
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
Yinghai Lu <yinghai@kernel.org> writes:
> On 03/08/2010 04:35 PM, Eric W. Biederman wrote:
>> Yinghai Lu <yinghai@kernel.org> writes:
>>
>> Yep this looks like a couple more cases of drivers that don't
>> statically declare and allocate their sysfs attributes.
>> The ipmi driver looks like it just wants to waste memory.
>> I haven't made sense of the thermal driver yet.
>>
>> Something like the untested patch below should fix the impi driver.
>>
>>
>> Eric
>>
>>> On Mon, Mar 8, 2010 at 3:47 PM, Alexander Beregalov
>>> <a.beregalov@gmail.com> wrote:
>>>> Hi
>>>>
>>>> Kernel version is 2.6.34-rc1
>>>>
>>>> bus: 'acpi': add driver processor
>>>> bus: 'acpi': driver_probe_device: matched device LNXCPU:00 with driver processor
>>>> bus: 'acpi': really_probe: probing driver processor with device LNXCPU:00
>>>> device: 'cooling_device0': device_add
>>>> driver: 'LNXCPU:00': driver_bound: bound to device 'processor'
>>>> bus: 'acpi': really_probe: bound device LNXCPU:00 to driver processor
>>>> bus: 'acpi': add driver thermal
>>>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:00 with driver thermal
>>>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:00
>>>> bus: 'acpi': driver_probe_device: matched device LNXTHERM:01 with driver thermal
>>>> bus: 'acpi': really_probe: probing driver thermal with device LNXTHERM:01
>>>> device: 'thermal_zone0': device_add
>>>> BUG: key f71f0168 not in .data!
>>>> ------------[ cut here ]------------
>>>> WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0x16f/0x4f0()
>>>> Hardware name:
>>>> Modules linked in:
>>>> Pid: 1, comm: swapper Not tainted 2.6.34-rc1 #1
>>>> Call Trace:
>>>> [<c1351758>] ? printk+0x18/0x20
>>>> [<c102aa5d>] warn_slowpath_common+0x6d/0xa0
>>>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>>>> [<c104e9af>] ? lockdep_init_map+0x16f/0x4f0
>>>> [<c1001000>] ? do_one_initcall+0x0/0x190
>>>> [<c102aaa5>] warn_slowpath_null+0x15/0x20
>>>> [<c104e9af>] lockdep_init_map+0x16f/0x4f0
>>>> [<c10dcd98>] sysfs_add_file_mode+0x58/0xb0
>>>> [<c10dce03>] sysfs_add_file+0x13/0x20
>>>> Switched to NOHz mode on CPU #0
>>>> [<c10dcec6>] sysfs_create_file+0x26/0x30
>>>> [<c1247ab3>] device_create_file+0x13/0x20
>>>> [<c12c5bd4>] thermal_zone_bind_cooling_device+0x1e4/0x2f0
>>>> [<c11feb35>] ? acpi_bus_data_handler+0x0/0x5
>>>> [<c121ed40>] acpi_thermal_cooling_device_cb+0x70/0x11e
>>>> [<c12c5780>] ? thermal_zone_device_register+0x260/0x400
>>>> [<c12c59f0>] ? thermal_zone_bind_cooling_device+0x0/0x2f0
>>>> [<c121ee0a>] acpi_thermal_bind_cooling_device+0xd/0xf
>>>> [<c12c57f9>] thermal_zone_device_register+0x2d9/0x400
>>>> [<c121ef82>] acpi_thermal_add+0x176/0x398
>>>> [<c10de301>] ? sysfs_do_create_link+0xa1/0x140
>>>> [<c11fec0f>] acpi_device_probe+0x3a/0xf4
>>>> [<c124a097>] driver_probe_device+0xb7/0x1b0
>>>> [<c124a219>] __driver_attach+0x89/0x90
>>>> [<c12498b8>] bus_for_each_dev+0x48/0x70
>>>> [<c1249e79>] driver_attach+0x19/0x20
>>>> [<c124a190>] ? __driver_attach+0x0/0x90
>>>> [<c124922b>] bus_add_driver+0xcb/0x230
>>>> [<c11feb45>] ? acpi_device_remove+0x0/0x90
>>>> [<c124a495>] driver_register+0x65/0x110
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c10d6bd3>] ? proc_mkdir_mode+0x33/0x50
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c11ffebb>] acpi_bus_register_driver+0x3a/0x3f
>>>> [<c1639062>] acpi_thermal_init+0x50/0x6f
>>>> [<c100102d>] do_one_initcall+0x2d/0x190
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c1639012>] ? acpi_thermal_init+0x0/0x6f
>>>> [<c162119a>] ? kernel_init+0x0/0x120
>>>> [<c1621221>] kernel_init+0x87/0x120
>>>> [<c1002fba>] kernel_thread_helper+0x6/0x1c
>>>> ---[ end trace a7919e7f17c0a725 ]---
>>>
>>>
>>> got
>>>
>>> [ 145.239329] BUG: key ffff88206fe99c58 not in .data!
>>> [ 145.244994] ------------[ cut here ]------------
>>> [ 145.250949] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xf1/0x53c()
>>> [ 145.262424] Hardware name: Sun Fire x4800
>>> [ 145.267543] Modules linked in:
>>> [ 145.275078] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-yh-dirty #221
>>> [ 145.285140] Call Trace:
>>> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
>>> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
>>> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
>>> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
>>> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
>>> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
>>> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
>>> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
>>> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
>>> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
>>> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
>>> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
>>> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
>>> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
>>> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
>>> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
>>> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
>>> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
>>> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
>>> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
>>> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
>>> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
>>
>> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
>> index ec5e3f8..16e9073 100644
>> --- a/drivers/char/ipmi/ipmi_msghandler.c
>> +++ b/drivers/char/ipmi/ipmi_msghandler.c
>> @@ -2272,42 +2272,52 @@ static int create_files(struct bmc_device *bmc)
>> bmc->device_id_attr.attr.name = "device_id";
>> bmc->device_id_attr.attr.mode = S_IRUGO;
>> bmc->device_id_attr.show = device_id_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs";
>> bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO;
>> bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->revision_attr.attr.name = "revision";
>> bmc->revision_attr.attr.mode = S_IRUGO;
>> bmc->revision_attr.show = revision_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->firmware_rev_attr.attr.name = "firmware_revision";
>> bmc->firmware_rev_attr.attr.mode = S_IRUGO;
>> bmc->firmware_rev_attr.show = firmware_rev_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->version_attr.attr.name = "ipmi_version";
>> bmc->version_attr.attr.mode = S_IRUGO;
>> bmc->version_attr.show = ipmi_version_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->add_dev_support_attr.attr.name = "additional_device_support";
>> bmc->add_dev_support_attr.attr.mode = S_IRUGO;
>> bmc->add_dev_support_attr.show = add_dev_support_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->manufacturer_id_attr.attr.name = "manufacturer_id";
>> bmc->manufacturer_id_attr.attr.mode = S_IRUGO;
>> bmc->manufacturer_id_attr.show = manufacturer_id_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->product_id_attr.attr.name = "product_id";
>> bmc->product_id_attr.attr.mode = S_IRUGO;
>> bmc->product_id_attr.show = product_id_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->guid_attr.attr.name = "guid";
>> bmc->guid_attr.attr.mode = S_IRUGO;
>> bmc->guid_attr.show = guid_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision";
>> bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO;
>> bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show;
>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>
>> err = device_create_file(&bmc->dev->dev,
>> &bmc->device_id_attr);
>
> still have bunch of that BUG...
I expect if you look the backtrace will be different.
There are real issues here, I just don't know how to find them
without bug reports, or volunteers helping me to fix them.
But the fixes are trivial, there is no problem if you disable lockdep,
and the machine still runs with lockdep enabled.
Which ultimately means that lockdep can finally report errors between
sysfs and files and locking reasonably accurately.
If you would be so kind and help by posting the back traces so we can
find the handful of places left that dynamically allocate their sysfs
attributes that would be very much appreciated.
Eric
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-09 7:57 ` Eric W. Biederman
@ 2010-03-12 2:29 ` Yinghai Lu
2010-03-12 2:32 ` Yinghai Lu
2010-03-13 3:37 ` Yinghai Lu
0 siblings, 2 replies; 16+ messages in thread
From: Yinghai Lu @ 2010-03-12 2:29 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
>>>> [ 145.290143] [<ffffffff810759b0>] warn_slowpath_common+0x7c/0x94
>>>> [ 145.304624] [<ffffffff810759dc>] warn_slowpath_null+0x14/0x16
>>>> [ 145.314632] [<ffffffff8109f299>] lockdep_init_map+0xf1/0x53c
>>>> [ 145.325228] [<ffffffff8117e100>] ? sysfs_new_dirent+0x8f/0x104
>>>> [ 145.334331] [<ffffffff8117d72e>] sysfs_add_file_mode+0x66/0xac
>>>> [ 145.339850] [<ffffffff8117d785>] sysfs_add_file+0x11/0x13
>>>> [ 145.355513] [<ffffffff8117d844>] sysfs_create_file+0x2a/0x2c
>>>> [ 145.360637] [<ffffffff8148ca98>] device_create_file+0x19/0x1b
>>>> [ 145.375187] [<ffffffff8145fc9a>] ipmi_register_smi+0x862/0xd72
>>>> [ 145.384606] [<ffffffff8148b9f8>] ? put_device+0x17/0x19
>>>> [ 145.395142] [<ffffffff8148cee5>] ? device_add+0x44b/0x52a
>>>> [ 145.403666] [<ffffffff8108fb5a>] ? autoremove_wake_function+0x0/0x39
>>>> [ 145.416309] [<ffffffff81462e71>] try_smi_init+0x6d0/0x8a0
>>>> [ 145.424534] [<ffffffff81ba2fd5>] init_ipmi_si+0x4cf/0x907
>>>> [ 145.434799] [<ffffffff81ba2b06>] ? init_ipmi_si+0x0/0x907
>>>> [ 145.439677] [<ffffffff8100020d>] do_one_initcall+0x72/0x17f
>>>> [ 145.455681] [<ffffffff826836a0>] kernel_init+0x166/0x1f0
>>>> [ 145.463319] [<ffffffff81032914>] kernel_thread_helper+0x4/0x10
>>>> [ 145.476497] [<ffffffff81bfc2bc>] ? restore_args+0x0/0x30
>>>> [ 145.485014] [<ffffffff8268353a>] ? kernel_init+0x0/0x1f0
>>>> [ 145.495859] [<ffffffff81032910>] ? kernel_thread_helper+0x0/0x10
>>>> [ 145.501541] ---[ end trace 0ec12b1482c47368 ]---
>>>
>>> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
>>> index ec5e3f8..16e9073 100644
>>> --- a/drivers/char/ipmi/ipmi_msghandler.c
>>> +++ b/drivers/char/ipmi/ipmi_msghandler.c
>>> @@ -2272,42 +2272,52 @@ static int create_files(struct bmc_device *bmc)
>>> bmc->device_id_attr.attr.name = "device_id";
>>> bmc->device_id_attr.attr.mode = S_IRUGO;
>>> bmc->device_id_attr.show = device_id_show;
>>> + sysfs_attr_init(&bmc->device_id_attr.attr);
>>>
>>> bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs";
>>> bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO;
>>> bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show;
>>> + sysfs_attr_init(&bmc->device_id_attr.attr);
...
> If you would be so kind and help by posting the back traces so we can
> find the handful of places left that dynamically allocate their sysfs
> attributes that would be very much appreciated.
have some typo in your patch.. all have the same name....
change them to right name, will fix that in ipmi path...
---
drivers/char/ipmi/ipmi_msghandler.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: linux-2.6/drivers/char/ipmi/ipmi_msghandler.c
===================================================================
--- linux-2.6.orig/drivers/char/ipmi/ipmi_msghandler.c
+++ linux-2.6/drivers/char/ipmi/ipmi_msghandler.c
@@ -2272,42 +2272,52 @@ static int create_files(struct bmc_devic
bmc->device_id_attr.attr.name = "device_id";
bmc->device_id_attr.attr.mode = S_IRUGO;
bmc->device_id_attr.show = device_id_show;
+ sysfs_attr_init(&bmc->device_id_attr.attr);
bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs";
bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO;
bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show;
+ sysfs_attr_init(&bmc->provides_dev_sdrs_attr.attr);
bmc->revision_attr.attr.name = "revision";
bmc->revision_attr.attr.mode = S_IRUGO;
bmc->revision_attr.show = revision_show;
+ sysfs_attr_init(&bmc->revision_attr.attr);
bmc->firmware_rev_attr.attr.name = "firmware_revision";
bmc->firmware_rev_attr.attr.mode = S_IRUGO;
bmc->firmware_rev_attr.show = firmware_rev_show;
+ sysfs_attr_init(&bmc->firmware_rev_attr.attr);
bmc->version_attr.attr.name = "ipmi_version";
bmc->version_attr.attr.mode = S_IRUGO;
bmc->version_attr.show = ipmi_version_show;
+ sysfs_attr_init(&bmc->version_attr.attr);
bmc->add_dev_support_attr.attr.name = "additional_device_support";
bmc->add_dev_support_attr.attr.mode = S_IRUGO;
bmc->add_dev_support_attr.show = add_dev_support_show;
+ sysfs_attr_init(&bmc->add_dev_support_attr.attr);
bmc->manufacturer_id_attr.attr.name = "manufacturer_id";
bmc->manufacturer_id_attr.attr.mode = S_IRUGO;
bmc->manufacturer_id_attr.show = manufacturer_id_show;
+ sysfs_attr_init(&bmc->manufacturer_id_attr.attr);
bmc->product_id_attr.attr.name = "product_id";
bmc->product_id_attr.attr.mode = S_IRUGO;
bmc->product_id_attr.show = product_id_show;
+ sysfs_attr_init(&bmc->product_id_attr.attr);
bmc->guid_attr.attr.name = "guid";
bmc->guid_attr.attr.mode = S_IRUGO;
bmc->guid_attr.show = guid_show;
+ sysfs_attr_init(&bmc->guid_attr.attr);
bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision";
bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO;
bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show;
+ sysfs_attr_init(&bmc->aux_firmware_rev_attr.attr);
err = device_create_file(&bmc->dev->dev,
&bmc->device_id_attr);
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-12 2:29 ` Yinghai Lu
@ 2010-03-12 2:32 ` Yinghai Lu
2010-03-13 3:36 ` Yinghai Lu
2010-03-13 3:37 ` Yinghai Lu
1 sibling, 1 reply; 16+ messages in thread
From: Yinghai Lu @ 2010-03-12 2:32 UTC (permalink / raw)
To: Eric W. Biederman, Roland Dreier
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
On 03/11/2010 06:29 PM, Yinghai Lu wrote:
>
>
> have some typo in your patch.. all have the same name....
>
> change them to right name, will fix that in ipmi path...
still need this one for inifiniband.
---
drivers/infiniband/core/sysfs.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/drivers/infiniband/core/sysfs.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/core/sysfs.c
+++ linux-2.6/drivers/infiniband/core/sysfs.c
@@ -461,6 +461,7 @@ alloc_group_attrs(ssize_t (*show)(struct
element->attr.attr.mode = S_IRUGO;
element->attr.show = show;
element->index = i;
+ sysfs_attr_init(&element->attr.attr);
tab_attr[i] = &element->attr.attr;
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-12 2:32 ` Yinghai Lu
@ 2010-03-13 3:36 ` Yinghai Lu
2010-03-13 3:54 ` Greg KH
0 siblings, 1 reply; 16+ messages in thread
From: Yinghai Lu @ 2010-03-13 3:36 UTC (permalink / raw)
To: Eric W. Biederman, Roland Dreier
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
---
drivers/net/mlx4/main.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/drivers/net/mlx4/main.c
===================================================================
--- linux-2.6.orig/drivers/net/mlx4/main.c
+++ linux-2.6/drivers/net/mlx4/main.c
@@ -1023,6 +1023,7 @@ static int mlx4_init_port_info(struct ml
info->port_attr.attr.mode = S_IRUGO | S_IWUSR;
info->port_attr.show = show_port_type;
info->port_attr.store = set_port_type;
+ sysfs_attr_init(&info->port_attr.attr);
err = device_create_file(&dev->pdev->dev, &info->port_attr);
if (err) {
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-12 2:29 ` Yinghai Lu
2010-03-12 2:32 ` Yinghai Lu
@ 2010-03-13 3:37 ` Yinghai Lu
2010-03-13 4:46 ` James Bottomley
1 sibling, 1 reply; 16+ messages in thread
From: Yinghai Lu @ 2010-03-13 3:37 UTC (permalink / raw)
To: Eric W. Biederman, James Bottomley
Cc: Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List
---
drivers/base/attribute_container.c | 1 +
drivers/scsi/lpfc/lpfc_attr.c | 3 +++
drivers/scsi/scsi_sysfs.c | 15 ++++++++++++---
3 files changed, 16 insertions(+), 3 deletions(-)
Index: linux-2.6/drivers/scsi/lpfc/lpfc_attr.c
===================================================================
--- linux-2.6.orig/drivers/scsi/lpfc/lpfc_attr.c
+++ linux-2.6/drivers/scsi/lpfc/lpfc_attr.c
@@ -3780,6 +3780,7 @@ lpfc_alloc_sysfs_attr(struct lpfc_vport
struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
int error;
+ sysfs_bin_attr_init(&sysfs_drvr_stat_data_attr);
error = sysfs_create_bin_file(&shost->shost_dev.kobj,
&sysfs_drvr_stat_data_attr);
@@ -3787,11 +3788,13 @@ lpfc_alloc_sysfs_attr(struct lpfc_vport
if (error || vport->port_type == LPFC_NPIV_PORT)
goto out;
+ sysfs_bin_attr_init(&sysfs_ctlreg_attr);
error = sysfs_create_bin_file(&shost->shost_dev.kobj,
&sysfs_ctlreg_attr);
if (error)
goto out_remove_stat_attr;
+ sysfs_bin_attr_init(&sysfs_mbox_attr);
error = sysfs_create_bin_file(&shost->shost_dev.kobj,
&sysfs_mbox_attr);
if (error)
Index: linux-2.6/drivers/scsi/scsi_sysfs.c
===================================================================
--- linux-2.6.orig/drivers/scsi/scsi_sysfs.c
+++ linux-2.6/drivers/scsi/scsi_sysfs.c
@@ -907,20 +907,27 @@ int scsi_sysfs_add_sdev(struct scsi_devi
/* create queue files, which may be writable, depending on the host */
if (sdev->host->hostt->change_queue_depth) {
+ sysfs_bin_attr_init(&sdev_attr_queue_depth_rw);
error = device_create_file(&sdev->sdev_gendev,
&sdev_attr_queue_depth_rw);
+ sysfs_bin_attr_init(&sdev_attr_queue_ramp_up_period);
error = device_create_file(&sdev->sdev_gendev,
&sdev_attr_queue_ramp_up_period);
}
- else
+ else {
+ sysfs_bin_attr_init(&dev_attr_queue_depth);
error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_depth);
+ }
if (error)
return error;
- if (sdev->host->hostt->change_queue_type)
+ if (sdev->host->hostt->change_queue_type) {
+ sysfs_bin_attr_init(&sdev_attr_queue_type_rw);
error = device_create_file(&sdev->sdev_gendev, &sdev_attr_queue_type_rw);
- else
+ } else {
+ sysfs_bin_attr_init(&dev_attr_queue_type);
error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_type);
+ }
if (error)
return error;
@@ -935,6 +942,7 @@ int scsi_sysfs_add_sdev(struct scsi_devi
/* add additional host specific attributes */
if (sdev->host->hostt->sdev_attrs) {
for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) {
+ sysfs_bin_attr_init(sdev->host->hostt->sdev_attrs[i]);
error = device_create_file(&sdev->sdev_gendev,
sdev->host->hostt->sdev_attrs[i]);
if (error)
@@ -1060,6 +1068,7 @@ int scsi_sysfs_add_host(struct Scsi_Host
/* add host specific attributes */
if (shost->hostt->shost_attrs) {
for (i = 0; shost->hostt->shost_attrs[i]; i++) {
+ sysfs_bin_attr_init(shost->hostt->shost_attrs[i]);
error = device_create_file(&shost->shost_dev,
shost->hostt->shost_attrs[i]);
if (error)
Index: linux-2.6/drivers/base/attribute_container.c
===================================================================
--- linux-2.6.orig/drivers/base/attribute_container.c
+++ linux-2.6/drivers/base/attribute_container.c
@@ -328,6 +328,7 @@ attribute_container_add_attrs(struct dev
return sysfs_create_group(&classdev->kobj, cont->grp);
for (i = 0; attrs[i]; i++) {
+ sysfs_bin_attr_init(attrs[i]);
error = device_create_file(classdev, attrs[i]);
if (error)
return error;
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-13 3:36 ` Yinghai Lu
@ 2010-03-13 3:54 ` Greg KH
0 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2010-03-13 3:54 UTC (permalink / raw)
To: Yinghai Lu
Cc: Eric W. Biederman, Roland Dreier, Alexander Beregalov, linux-acpi,
Linux Kernel Mailing List
On Fri, Mar 12, 2010 at 07:36:22PM -0800, Yinghai Lu wrote:
> ---
> drivers/net/mlx4/main.c | 1 +
> 1 file changed, 1 insertion(+)
No change log entry + no Signed-off-by: line = email deleted
It's as if we write documentation on how to do all of this to just watch
no one read it :(
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-13 3:37 ` Yinghai Lu
@ 2010-03-13 4:46 ` James Bottomley
2010-03-13 4:58 ` Eric W. Biederman
0 siblings, 1 reply; 16+ messages in thread
From: James Bottomley @ 2010-03-13 4:46 UTC (permalink / raw)
To: Yinghai Lu
Cc: Eric W. Biederman, Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List, linux-scsi
On Fri, 2010-03-12 at 19:37 -0800, Yinghai Lu wrote:
> ---
> drivers/base/attribute_container.c | 1 +
> drivers/scsi/lpfc/lpfc_attr.c | 3 +++
> drivers/scsi/scsi_sysfs.c | 15 ++++++++++++---
> 3 files changed, 16 insertions(+), 3 deletions(-)
Added linux-scsi, since this seems to be a SCSI fix.
I've no idea what actual problem this is fixing, what's the descriptive
changelog for this?
James
> Index: linux-2.6/drivers/scsi/lpfc/lpfc_attr.c
> ===================================================================
> --- linux-2.6.orig/drivers/scsi/lpfc/lpfc_attr.c
> +++ linux-2.6/drivers/scsi/lpfc/lpfc_attr.c
> @@ -3780,6 +3780,7 @@ lpfc_alloc_sysfs_attr(struct lpfc_vport
> struct Scsi_Host *shost = lpfc_shost_from_vport(vport);
> int error;
>
> + sysfs_bin_attr_init(&sysfs_drvr_stat_data_attr);
> error = sysfs_create_bin_file(&shost->shost_dev.kobj,
> &sysfs_drvr_stat_data_attr);
>
> @@ -3787,11 +3788,13 @@ lpfc_alloc_sysfs_attr(struct lpfc_vport
> if (error || vport->port_type == LPFC_NPIV_PORT)
> goto out;
>
> + sysfs_bin_attr_init(&sysfs_ctlreg_attr);
> error = sysfs_create_bin_file(&shost->shost_dev.kobj,
> &sysfs_ctlreg_attr);
> if (error)
> goto out_remove_stat_attr;
>
> + sysfs_bin_attr_init(&sysfs_mbox_attr);
> error = sysfs_create_bin_file(&shost->shost_dev.kobj,
> &sysfs_mbox_attr);
> if (error)
> Index: linux-2.6/drivers/scsi/scsi_sysfs.c
> ===================================================================
> --- linux-2.6.orig/drivers/scsi/scsi_sysfs.c
> +++ linux-2.6/drivers/scsi/scsi_sysfs.c
> @@ -907,20 +907,27 @@ int scsi_sysfs_add_sdev(struct scsi_devi
>
> /* create queue files, which may be writable, depending on the host */
> if (sdev->host->hostt->change_queue_depth) {
> + sysfs_bin_attr_init(&sdev_attr_queue_depth_rw);
> error = device_create_file(&sdev->sdev_gendev,
> &sdev_attr_queue_depth_rw);
> + sysfs_bin_attr_init(&sdev_attr_queue_ramp_up_period);
> error = device_create_file(&sdev->sdev_gendev,
> &sdev_attr_queue_ramp_up_period);
> }
> - else
> + else {
> + sysfs_bin_attr_init(&dev_attr_queue_depth);
> error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_depth);
> + }
> if (error)
> return error;
>
> - if (sdev->host->hostt->change_queue_type)
> + if (sdev->host->hostt->change_queue_type) {
> + sysfs_bin_attr_init(&sdev_attr_queue_type_rw);
> error = device_create_file(&sdev->sdev_gendev, &sdev_attr_queue_type_rw);
> - else
> + } else {
> + sysfs_bin_attr_init(&dev_attr_queue_type);
> error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_type);
> + }
> if (error)
> return error;
>
> @@ -935,6 +942,7 @@ int scsi_sysfs_add_sdev(struct scsi_devi
> /* add additional host specific attributes */
> if (sdev->host->hostt->sdev_attrs) {
> for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) {
> + sysfs_bin_attr_init(sdev->host->hostt->sdev_attrs[i]);
> error = device_create_file(&sdev->sdev_gendev,
> sdev->host->hostt->sdev_attrs[i]);
> if (error)
> @@ -1060,6 +1068,7 @@ int scsi_sysfs_add_host(struct Scsi_Host
> /* add host specific attributes */
> if (shost->hostt->shost_attrs) {
> for (i = 0; shost->hostt->shost_attrs[i]; i++) {
> + sysfs_bin_attr_init(shost->hostt->shost_attrs[i]);
> error = device_create_file(&shost->shost_dev,
> shost->hostt->shost_attrs[i]);
> if (error)
> Index: linux-2.6/drivers/base/attribute_container.c
> ===================================================================
> --- linux-2.6.orig/drivers/base/attribute_container.c
> +++ linux-2.6/drivers/base/attribute_container.c
> @@ -328,6 +328,7 @@ attribute_container_add_attrs(struct dev
> return sysfs_create_group(&classdev->kobj, cont->grp);
>
> for (i = 0; attrs[i]; i++) {
> + sysfs_bin_attr_init(attrs[i]);
> error = device_create_file(classdev, attrs[i]);
> if (error)
> return error;
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-13 4:46 ` James Bottomley
@ 2010-03-13 4:58 ` Eric W. Biederman
2010-03-13 5:13 ` Matthew Wilcox
0 siblings, 1 reply; 16+ messages in thread
From: Eric W. Biederman @ 2010-03-13 4:58 UTC (permalink / raw)
To: James Bottomley
Cc: Yinghai Lu, Alexander Beregalov, Greg KH, linux-acpi,
Linux Kernel Mailing List, linux-scsi
James Bottomley <James.Bottomley@HansenPartnership.com> writes:
> On Fri, 2010-03-12 at 19:37 -0800, Yinghai Lu wrote:
>> ---
>> drivers/base/attribute_container.c | 1 +
>> drivers/scsi/lpfc/lpfc_attr.c | 3 +++
>> drivers/scsi/scsi_sysfs.c | 15 ++++++++++++---
>> 3 files changed, 16 insertions(+), 3 deletions(-)
>
> Added linux-scsi, since this seems to be a SCSI fix.
>
> I've no idea what actual problem this is fixing, what's the descriptive
> changelog for this?
The root problem is that we occasionally have unrecognized deadlocks
on the sysfs attributes.
For 2.6.33 I managed to get lockdep mostly working but there the way
I did it generated a lot of false positives.
For 2.6.34 I reworked the sysfs lockdep handling to remove the false
positives by treating each sysfs attribute as it's own class. Most
sysfs attributes are declared statically and don't need any
initialization. Unfortunately there are a handful of dynamically
allocated sysfs attributes that do need initialization.
This patch is a fix to get one of those last handful of dynamically
allocated sysfs attributes that I missed and apparently do not
exist in my test system.
None of this has any effect (for now) when lockdep is disabled.
Eric
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data!
2010-03-13 4:58 ` Eric W. Biederman
@ 2010-03-13 5:13 ` Matthew Wilcox
0 siblings, 0 replies; 16+ messages in thread
From: Matthew Wilcox @ 2010-03-13 5:13 UTC (permalink / raw)
To: Eric W. Biederman
Cc: James Bottomley, Yinghai Lu, Alexander Beregalov, Greg KH,
linux-acpi, Linux Kernel Mailing List, linux-scsi
On Fri, Mar 12, 2010 at 08:58:36PM -0800, Eric W. Biederman wrote:
> The root problem is that we occasionally have unrecognized deadlocks
> on the sysfs attributes.
>
> For 2.6.33 I managed to get lockdep mostly working but there the way
> I did it generated a lot of false positives.
>
> For 2.6.34 I reworked the sysfs lockdep handling to remove the false
> positives by treating each sysfs attribute as it's own class. Most
> sysfs attributes are declared statically and don't need any
> initialization. Unfortunately there are a handful of dynamically
> allocated sysfs attributes that do need initialization.
>
> This patch is a fix to get one of those last handful of dynamically
> allocated sysfs attributes that I missed and apparently do not
> exist in my test system.
There's a few more than this showing up on my laptop. Looking in dmesg,
the first gets a backtrace:
[ 1.034471] BUG: key f6a26638 not in .data!
[ 1.034600] ------------[ cut here ]------------
[ 1.034736] WARNING: at kernel/lockdep.c:2706 lockdep_init_map+0xd1/0x40c()
[ 1.034867] Hardware name: LifeBook P8010
[ 1.034993] Modules linked in:
[ 1.035170] Pid: 1, comm: swapper Not tainted 2.6.34-rc1-00005-g522dba7 #80
[ 1.035300] Call Trace:
[ 1.035428] [<c102caba>] warn_slowpath_common+0x60/0x90
[ 1.035561] [<c102caf7>] warn_slowpath_null+0xd/0x10
[ 1.035694] [<c104fa6a>] lockdep_init_map+0xd1/0x40c
[ 1.035827] [<c10de32a>] ? sysfs_new_dirent+0x73/0xdb
[ 1.035959] [<c10ddc56>] sysfs_add_file_mode+0x4c/0x88
[ 1.036132] [<c10ddca0>] sysfs_add_file+0xe/0x13
[ 1.036264] [<c10ddd32>] sysfs_create_file+0x20/0x22
[ 1.036394] [<c11ee279>] device_create_file+0x13/0x15
[ 1.036528] [<c129246e>] thermal_zone_device_register+0x3d0/0x5db
[ 1.036662] [<c11b160f>] acpi_thermal_add+0x1f6/0x42d
Subsequent ones don't:
[ 1.039072] BUG: key f6a26668 not in .data!
[ 1.039220] BUG: key f6a2f488 not in .data!
[ 1.039358] BUG: key f6a2f408 not in .data!
[ 1.039571] thermal LNXTHERM:01: registered as thermal_zone0
[ 1.039719] ACPI: Thermal Zone [TZ00] (27 C)
[ 1.040515] BUG: key f6a18e38 not in .data!
[ 1.040648] BUG: key f6a18e68 not in .data!
[ 1.040800] BUG: key f6a9ef88 not in .data!
[ 1.040941] BUG: key f6a9ef08 not in .data!
[ 1.041185] thermal LNXTHERM:02: registered as thermal_zone1
[ 25.196957] iwlagn 0000:14:00.0: firmware: requesting iwlwifi-4965-2.ucode
[ 25.197163] BUG: key f663393c not in .data!
[ 25.217340] iwlagn 0000:14:00.0: loaded firmware version 228.57.2.21
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-03-13 5:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 23:47 2.6.34-rc1: ACPI: BUG: key f71f0168 not in .data! Alexander Beregalov
2010-03-09 0:12 ` Yinghai Lu
2010-03-09 0:32 ` Yinghai Lu
2010-03-09 0:40 ` Américo Wang
2010-03-09 0:35 ` Eric W. Biederman
2010-03-09 7:06 ` Yinghai Lu
2010-03-09 7:57 ` Eric W. Biederman
2010-03-09 7:57 ` Eric W. Biederman
2010-03-12 2:29 ` Yinghai Lu
2010-03-12 2:32 ` Yinghai Lu
2010-03-13 3:36 ` Yinghai Lu
2010-03-13 3:54 ` Greg KH
2010-03-13 3:37 ` Yinghai Lu
2010-03-13 4:46 ` James Bottomley
2010-03-13 4:58 ` Eric W. Biederman
2010-03-13 5:13 ` Matthew Wilcox
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).