Skip to contentSkip to conversation

[2.6.22] edac: sleeping function called from invalid context

DISCUSSION Luca Tettamanti 1 participant 1 message Jul 14, 2007

lore
Share & tools
lore
#0 lore raw

Hi,
as soon as I enable parity check on PCI bus (with polling - EDAC_POLL), the following warning is triggered:

EDAC MC: Ver: 2.0.1 Jul 13 2007

BUG: sleeping function called from invalid context at /home/kronos/src/linux-2.6.git/kernel/rwsem.c:20
in_atomic():0, irqs_disabled():1
INFO: lockdep is turned off.
irq event stamp: 0
hardirqs last  enabled at (0): [<00000000>] 0x0
hardirqs last disabled at (0): [<c0120063>] copy_process+0x363/0x11e8
softirqs last  enabled at (0): [<c0120063>] copy_process+0x363/0x11e8
softirqs last disabled at (0): [<00000000>] 0x0
 [<c0134fb2>] down_read+0x15/0x49
 [<c02f4669>] schedule_timeout+0x79/0x8d
 [<c01deef0>] pci_get_subsys+0x68/0xea
 [<c01298a4>] process_timeout+0x0/0x5
 [<c01def88>] pci_get_device+0x16/0x19
 [<fa4b98cd>] edac_kernel_thread+0x94/0x10c [edac_mc]
 [<fa4b9839>] edac_kernel_thread+0x0/0x10c [edac_mc]
 [<c0132264>] kthread+0x38/0x60
 [<c013222c>] kthread+0x0/0x60
 [<c0104ae7>] kernel_thread_helper+0x7/0x10
 =======================

The warning is caused by the fact that do_pci_parity_check() calls edac_pci_dev_parity_iterator() with interrupts disabled and pci_get_device acquires pci_bus_sem (via pci_get_subsys).

Luca

Signature · 3 lines
"La mia teoria scientifica preferita e` quella secondo la quale gli 
 anelli di Saturno sarebbero interamente composti dai bagagli andati 
 persi nei viaggi aerei." -- Mark Russel