lockdep warning in pcmcia_socket_dev_suspend
Jonathan Nieder
jrnieder at gmail.com
Tue Oct 20 12:06:28 EDT 2009
Hi pcmcia maintainers,
In recent kernels, I started getting a lockdep warning in the kernel
log on suspend. I see no other symptoms (except that my wireless card
suspends and resumes properly now --- thanks!), but this message is
perfectly reproducible. I am pretty sure it wasn’t there in v2.6.31.
Grasping at straws, I tried reverting commit 0c570cdeb8 (PM / yenta:
Fix cardbus suspend/resume regression). That does make the message
go away (and the wireless card suspend problems come back).
This log fragment is for a kernel built from Linus’s commit
v2.6.32-rc5-11-g2fdc246, plus three small local patches to the
Makefile.
Perhaps this comment from drivers/base/power/main.c is relevant:
* Since device_pm_add() may be called with a device semaphore held,
* we must never try to acquire a device semaphore while holding
* dpm_list_mutex.
But I am way out of my depth here.
Thoughts?
Jonathan
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
ath5k 0000:02:00.0: PCI INT A disabled
sd 0:0:0:0: [sda] Synchronizing SCSI cache
sd 0:0:0:0: [sda] Stopping disk
parport_pc 00:0f: disabled
Maestro3 0000:00:08.0: PCI INT A disabled
ACPI handle has no context!
uhci_hcd 0000:00:07.2: PCI INT D disabled
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.32-rc5-00014-g68c786f #13
-------------------------------------------------------
s2ram/2242 is trying to acquire lock:
(&socket->skt_mutex){+.+.+.}, at: [<ccaa2ce7>] pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
but task is already holding lock:
(pcmcia_socket_list_rwsem){++++..}, at: [<ccaa2cc8>] pcmcia_socket_dev_suspend+0x20/0x8e [pcmcia_core]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (pcmcia_socket_list_rwsem){++++..}:
[<c015a99a>] __lock_acquire+0xa02/0xb71
[<c015abbb>] lock_acquire+0xb2/0xdc
[<c0396dfc>] down_read+0x29/0x4d
[<ccaa2cc8>] pcmcia_socket_dev_suspend+0x20/0x8e [pcmcia_core]
[<ccba8951>] yenta_dev_suspend_noirq+0x29/0x9d [yenta_socket]
[<c02757b1>] pci_pm_suspend_noirq+0x66/0x10b
[<c02e0319>] pm_noirq_op+0x54/0xdf
[<c02e0bdd>] dpm_suspend_noirq+0x46/0xb9
[<c0166155>] suspend_devices_and_enter+0x84/0x149
[<c01662ca>] enter_state+0xb0/0xd9
[<c0165a39>] state_store+0xa1/0xc7
[<c0260f77>] kobj_attr_store+0x27/0x45
[<c0211a43>] sysfs_write_file+0xd3/0x10f
[<c01c802e>] vfs_write+0x98/0x106
[<c01c8176>] sys_write+0x50/0x84
[<c0102d8b>] sysenter_do_call+0x12/0x32
-> #1 (dpm_list_mtx){+.+...}:
[<c015a99a>] __lock_acquire+0xa02/0xb71
[<c015abbb>] lock_acquire+0xb2/0xdc
[<c039679b>] __mutex_lock_common+0x4a/0x387
[<c0396b61>] mutex_lock_nested+0x21/0x35
[<c02e0ccc>] device_pm_add+0x22/0xac
[<c02d99b8>] device_add+0x2be/0x43a
[<c026fa25>] pci_bus_add_device+0x1d/0x50
[<c026fa86>] pci_bus_add_devices+0x2e/0xfc
[<ccaa6159>] cb_alloc+0xaf/0xd4 [pcmcia_core]
[<ccaa2874>] socket_insert+0xbc/0xf5 [pcmcia_core]
[<ccaa31b3>] pccardd+0x177/0x214 [pcmcia_core]
[<c0147e67>] kthread+0x69/0x6e
[<c010372f>] kernel_thread_helper+0x7/0x58
-> #0 (&socket->skt_mutex){+.+.+.}:
[<c015a89d>] __lock_acquire+0x905/0xb71
[<c015abbb>] lock_acquire+0xb2/0xdc
[<c039679b>] __mutex_lock_common+0x4a/0x387
[<c0396b61>] mutex_lock_nested+0x21/0x35
[<ccaa2ce7>] pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<ccba8951>] yenta_dev_suspend_noirq+0x29/0x9d [yenta_socket]
[<c02757b1>] pci_pm_suspend_noirq+0x66/0x10b
[<c02e0319>] pm_noirq_op+0x54/0xdf
[<c02e0bdd>] dpm_suspend_noirq+0x46/0xb9
[<c0166155>] suspend_devices_and_enter+0x84/0x149
[<c01662ca>] enter_state+0xb0/0xd9
[<c0165a39>] state_store+0xa1/0xc7
[<c0260f77>] kobj_attr_store+0x27/0x45
[<c0211a43>] sysfs_write_file+0xd3/0x10f
[<c01c802e>] vfs_write+0x98/0x106
[<c01c8176>] sys_write+0x50/0x84
[<c0102d8b>] sysenter_do_call+0x12/0x32
other info that might help us debug this:
4 locks held by s2ram/2242:
#0: (&buffer->mutex){+.+.+.}, at: [<c02119a8>] sysfs_write_file+0x38/0x10f
#1: (pm_mutex){+.+.+.}, at: [<c016624b>] enter_state+0x31/0xd9
#2: (dpm_list_mtx){+.+...}, at: [<c02e0bbe>] dpm_suspend_noirq+0x27/0xb9
#3: (pcmcia_socket_list_rwsem){++++..}, at: [<ccaa2cc8>] pcmcia_socket_dev_suspend+0x20/0x8e [pcmcia_core]
stack backtrace:
Pid: 2242, comm: s2ram Not tainted 2.6.32-rc5-00014-g68c786f #13
Call Trace:
[<c0395658>] ? printk+0x1d/0x35
[<c0159c14>] print_circular_bug+0x9b/0xb8
[<c015a89d>] __lock_acquire+0x905/0xb71
[<ccaa2ce7>] ? pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<c015abbb>] lock_acquire+0xb2/0xdc
[<ccaa2ce7>] ? pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<c039679b>] __mutex_lock_common+0x4a/0x387
[<ccaa2ce7>] ? pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<ccaa2ce7>] ? pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<c0396b61>] mutex_lock_nested+0x21/0x35
[<ccaa2ce7>] ? pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<ccaa2ce7>] pcmcia_socket_dev_suspend+0x3f/0x8e [pcmcia_core]
[<ccba8951>] yenta_dev_suspend_noirq+0x29/0x9d [yenta_socket]
[<c02757b1>] pci_pm_suspend_noirq+0x66/0x10b
[<c02e0319>] pm_noirq_op+0x54/0xdf
[<c02e0bdd>] dpm_suspend_noirq+0x46/0xb9
[<c0166155>] suspend_devices_and_enter+0x84/0x149
[<c01662ca>] enter_state+0xb0/0xd9
[<c0165a39>] state_store+0xa1/0xc7
[<c0165998>] ? state_store+0x0/0xc7
[<c0260f77>] kobj_attr_store+0x27/0x45
[<c0211a43>] sysfs_write_file+0xd3/0x10f
[<c0211970>] ? sysfs_write_file+0x0/0x10f
[<c01c802e>] vfs_write+0x98/0x106
[<c01c8176>] sys_write+0x50/0x84
[<c0102d8b>] sysenter_do_call+0x12/0x32
ACPI: Preparing to enter system sleep state S3
More information about the linux-pcmcia
mailing list