[RFC v3] PCMCIA locking updates for 2.6.34

Wolfram Sang w.sang at pengutronix.de
Tue Jan 19 17:11:26 EST 2010


> No lockdep-warnings anymore whatever I tried. kmemleak reports something, but

Sorry, today I got this (after applying the patch to make my D-Link DMF560TX
work):

Jan 19 23:03:05 goodluck kernel: [   65.323364] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
Jan 19 23:03:05 goodluck kernel: [   65.324983] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
Jan 19 23:03:05 goodluck kernel: [   65.505186] eth0: NE2000 (DL10019 rev 05): io 0x300, irq 11, hw_addr [hidden ;)]
Jan 19 23:03:05 goodluck kernel: [   65.505688] pcmcia 0.1: pcmcia: registering new device pcmcia0.1
Jan 19 23:03:05 goodluck kernel: [   65.573571] 0.1: ttyS1 at I/O 0x2f8 (irq = 11) is a 16550A
Jan 19 23:03:11 goodluck kernel: [   71.618743] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot 0
Jan 19 23:03:11 goodluck kernel: [   71.618967] 
Jan 19 23:03:11 goodluck kernel: [   71.618969] =======================================================
Jan 19 23:03:11 goodluck kernel: [   71.618975] [ INFO: possible circular locking dependency detected ]
Jan 19 23:03:11 goodluck kernel: [   71.618982] 2.6.33-rc4-ninja-00148-gf842b63-dirty #69
Jan 19 23:03:11 goodluck kernel: [   71.618988] -------------------------------------------------------
Jan 19 23:03:11 goodluck kernel: [   71.618994] pccardd/1284 is trying to acquire lock:
Jan 19 23:03:11 goodluck kernel: [   71.618999]  (events){+.+.+.}, at: [<801482d0>] flush_workqueue+0x0/0x70
Jan 19 23:03:11 goodluck kernel: [   71.619019] 
Jan 19 23:03:11 goodluck kernel: [   71.619021] but task is already holding lock:
Jan 19 23:03:11 goodluck kernel: [   71.619027]  (&socket->skt_mutex){+.+.+.}, at: [<c1afe721>] pccardd+0x181/0x3a0 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619047] 
Jan 19 23:03:11 goodluck kernel: [   71.619049] which lock already depends on the new lock.
Jan 19 23:03:11 goodluck kernel: [   71.619052] 
Jan 19 23:03:11 goodluck kernel: [   71.619056] 
Jan 19 23:03:11 goodluck kernel: [   71.619058] the existing dependency chain (in reverse order) is:
Jan 19 23:03:11 goodluck kernel: [   71.619064] 
Jan 19 23:03:11 goodluck kernel: [   71.619065] -> #2 (&socket->skt_mutex){+.+.+.}:
Jan 19 23:03:11 goodluck kernel: [   71.619076]        [<8015fe21>] __lock_acquire+0x11b1/0x1940
Jan 19 23:03:11 goodluck kernel: [   71.619088]        [<80160669>] lock_acquire+0xb9/0xd0
Jan 19 23:03:11 goodluck kernel: [   71.619097]        [<8053c6d6>] mutex_lock_nested+0x46/0x2a0
Jan 19 23:03:11 goodluck kernel: [   71.619108]        [<c1c86919>] pcmcia_delayed_requery+0x29/0x140 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619125]        [<80147a34>] worker_thread+0x1b4/0x2c0
Jan 19 23:03:11 goodluck kernel: [   71.619134]        [<8014b374>] kthread+0x74/0x80
Jan 19 23:03:11 goodluck kernel: [   71.619144]        [<801031ba>] kernel_thread_helper+0x6/0x10
Jan 19 23:03:11 goodluck kernel: [   71.619155] 
Jan 19 23:03:11 goodluck kernel: [   71.619157] -> #1 ((&socket->requery)){+.+.+.}:
Jan 19 23:03:11 goodluck kernel: [   71.619166]        [<8015fe21>] __lock_acquire+0x11b1/0x1940
Jan 19 23:03:11 goodluck kernel: [   71.619176]        [<80160669>] lock_acquire+0xb9/0xd0
Jan 19 23:03:11 goodluck kernel: [   71.619185]        [<80147a2f>] worker_thread+0x1af/0x2c0
Jan 19 23:03:11 goodluck kernel: [   71.619194]        [<8014b374>] kthread+0x74/0x80
Jan 19 23:03:11 goodluck kernel: [   71.619203]        [<801031ba>] kernel_thread_helper+0x6/0x10
Jan 19 23:03:11 goodluck kernel: [   71.619213] 
Jan 19 23:03:11 goodluck kernel: [   71.619214] -> #0 (events){+.+.+.}:
Jan 19 23:03:11 goodluck kernel: [   71.619224]        [<801605ac>] __lock_acquire+0x193c/0x1940
Jan 19 23:03:11 goodluck kernel: [   71.619233]        [<80160669>] lock_acquire+0xb9/0xd0
Jan 19 23:03:11 goodluck kernel: [   71.619242]        [<80148315>] flush_workqueue+0x45/0x70
Jan 19 23:03:11 goodluck kernel: [   71.619251]        [<80148352>] flush_scheduled_work+0x12/0x20
Jan 19 23:03:11 goodluck kernel: [   71.619261]        [<c1c7926a>] serial_detach+0x2a/0x80 [serial_cs]
Jan 19 23:03:11 goodluck kernel: [   71.619272]        [<c1c84e46>] pcmcia_device_remove+0x56/0x1e0 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619286]        [<803dca48>] __device_release_driver+0x58/0xa0
Jan 19 23:03:11 goodluck kernel: [   71.619297]        [<803dcb55>] device_release_driver+0x25/0x40
Jan 19 23:03:11 goodluck kernel: [   71.619306]        [<803dbed2>] bus_remove_device+0xa2/0x100
Jan 19 23:03:11 goodluck kernel: [   71.619315]        [<803d9b34>] device_del+0x114/0x180
Jan 19 23:03:11 goodluck kernel: [   71.619327]        [<803d9bbe>] device_unregister+0x1e/0x60
Jan 19 23:03:11 goodluck kernel: [   71.619337]        [<c1c84a17>] pcmcia_card_remove+0xb7/0x190 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619350]        [<c1c867f7>] ds_event+0x137/0x230 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619363]        [<c1afd57a>] send_event+0xba/0x160 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619376]        [<c1afe11d>] socket_shutdown+0x2d/0x160 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619389]        [<c1afe44c>] socket_remove+0x4c/0x60 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619402]        [<c1afe845>] pccardd+0x2a5/0x3a0 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619414]        [<8014b374>] kthread+0x74/0x80
Jan 19 23:03:11 goodluck kernel: [   71.619423]        [<801031ba>] kernel_thread_helper+0x6/0x10
Jan 19 23:03:11 goodluck kernel: [   71.619433] 
Jan 19 23:03:11 goodluck kernel: [   71.619434] other info that might help us debug this:
Jan 19 23:03:11 goodluck kernel: [   71.619437] 
Jan 19 23:03:11 goodluck kernel: [   71.619443] 1 lock held by pccardd/1284:
Jan 19 23:03:11 goodluck kernel: [   71.619448]  #0:  (&socket->skt_mutex){+.+.+.}, at: [<c1afe721>] pccardd+0x181/0x3a0 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619467] 
Jan 19 23:03:11 goodluck kernel: [   71.619468] stack backtrace:
Jan 19 23:03:11 goodluck kernel: [   71.619476] Pid: 1284, comm: pccardd Not tainted 2.6.33-rc4-ninja-00148-gf842b63-dirty #69
Jan 19 23:03:11 goodluck kernel: [   71.619483] Call Trace:
Jan 19 23:03:11 goodluck kernel: [   71.619495]  [<8053b041>] ? printk+0x1d/0x24
Jan 19 23:03:11 goodluck kernel: [   71.619504]  [<8015e709>] print_circular_bug+0xd9/0xe0
Jan 19 23:03:11 goodluck kernel: [   71.619514]  [<801605ac>] __lock_acquire+0x193c/0x1940
Jan 19 23:03:11 goodluck kernel: [   71.619525]  [<8015dd3b>] ? trace_hardirqs_on+0xb/0x10
Jan 19 23:03:11 goodluck kernel: [   71.619535]  [<80160669>] lock_acquire+0xb9/0xd0
Jan 19 23:03:11 goodluck kernel: [   71.619544]  [<801482d0>] ? flush_workqueue+0x0/0x70
Jan 19 23:03:11 goodluck kernel: [   71.619553]  [<80148315>] flush_workqueue+0x45/0x70
Jan 19 23:03:11 goodluck kernel: [   71.619561]  [<801482d0>] ? flush_workqueue+0x0/0x70
Jan 19 23:03:11 goodluck kernel: [   71.619570]  [<80148352>] flush_scheduled_work+0x12/0x20
Jan 19 23:03:11 goodluck kernel: [   71.619580]  [<c1c7926a>] serial_detach+0x2a/0x80 [serial_cs]
Jan 19 23:03:11 goodluck kernel: [   71.619594]  [<c1c84e46>] pcmcia_device_remove+0x56/0x1e0 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619605]  [<803dca48>] __device_release_driver+0x58/0xa0
Jan 19 23:03:11 goodluck kernel: [   71.619614]  [<803dcb55>] device_release_driver+0x25/0x40
Jan 19 23:03:11 goodluck kernel: [   71.619622]  [<803dbed2>] bus_remove_device+0xa2/0x100
Jan 19 23:03:11 goodluck kernel: [   71.619632]  [<803d9b34>] device_del+0x114/0x180
Jan 19 23:03:11 goodluck kernel: [   71.619642]  [<803d9bbe>] device_unregister+0x1e/0x60
Jan 19 23:03:11 goodluck kernel: [   71.619655]  [<c1c84a17>] pcmcia_card_remove+0xb7/0x190 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619664]  [<8015dcec>] ? trace_hardirqs_on_caller+0x11c/0x160
Jan 19 23:03:11 goodluck kernel: [   71.619674]  [<8015dd3b>] ? trace_hardirqs_on+0xb/0x10
Jan 19 23:03:11 goodluck kernel: [   71.619688]  [<c1c867f7>] ds_event+0x137/0x230 [pcmcia]
Jan 19 23:03:11 goodluck kernel: [   71.619701]  [<c1afd57a>] send_event+0xba/0x160 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619714]  [<c1afe11d>] socket_shutdown+0x2d/0x160 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619725]  [<8053b041>] ? printk+0x1d/0x24
Jan 19 23:03:11 goodluck kernel: [   71.619737]  [<c1afe44c>] socket_remove+0x4c/0x60 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619750]  [<c1afe845>] pccardd+0x2a5/0x3a0 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619763]  [<c1afe5a0>] ? pccardd+0x0/0x3a0 [pcmcia_core]
Jan 19 23:03:11 goodluck kernel: [   71.619773]  [<8014b374>] kthread+0x74/0x80
Jan 19 23:03:11 goodluck kernel: [   71.619782]  [<8014b300>] ? kthread+0x0/0x80
Jan 19 23:03:11 goodluck kernel: [   71.619791]  [<801031ba>] kernel_thread_helper+0x6/0x10

The slot continues to work, though. It does not happen every time I release the
card. I could not trigger it a second time up to now.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20100119/637e3020/attachment.sig>


More information about the linux-pcmcia mailing list