From: Andrew Morton <akpm@linux-foundation.org>
To: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.26-rc2-mm1: possible circular locking dependency detected
Date: Tue, 20 May 2008 03:22:48 -0700 [thread overview]
Message-ID: <20080520032248.a4374951.akpm@linux-foundation.org> (raw)
In-Reply-To: <200805201201.34688.m.kozlowski@tuxland.pl>
On Tue, 20 May 2008 12:01:34 +0200 Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
> Hello,
>
> This lockdep warning is seen when I remove pcmcia wifi card
> from the slot. Doesn't happen every time. It's x86_32.
>
> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.26-rc2-mm1 #2
> -------------------------------------------------------
> pccardd/1037 is trying to acquire lock:
> (rtnl_mutex){--..}, at: [<c02870f1>] rtnl_lock+0x14/0x16
>
> but task is already holding lock:
> (&socket->skt_mutex){--..}, at: [<c02608ba>] pccardd+0x161/0x28c
>
> which lock already depends on the new lock.
>
>
> the existing dependency chain (in reverse order) is:
OK, three locks are involved here.
> -> #2 (&socket->skt_mutex){--..}:
> [<c013fff0>] __lock_acquire+0xf3b/0x103b
> [<c0140169>] lock_acquire+0x79/0x92
> [<c02cfcd5>] mutex_lock_nested+0x90/0x290
> [<c02600a6>] pccard_register_pcmcia+0x22/0x78
> [<ded5af02>] pcmcia_bus_add_socket+0x9f/0xe0 [pcmcia]
> [<c0251c02>] class_interface_register+0x83/0xb2
> [<ded6003a>] 0xded6003a
> [<c0146115>] sys_init_module+0x11e/0x18e4
> [<c0103001>] sysenter_past_esp+0x6a/0xa5
> [<ffffffff>] 0xffffffff
cls->mutex
socket->skt_mutex
> -> #1 (&cls->mutex){--..}:
> [<c013fff0>] __lock_acquire+0xf3b/0x103b
> [<c0140169>] lock_acquire+0x79/0x92
> [<c02cfcd5>] mutex_lock_nested+0x90/0x290
> [<c024f4a0>] device_add+0x42f/0x557
> [<c02895a1>] netdev_register_kobject+0x76/0x7b
> [<c027e3f6>] register_netdevice+0x22e/0x39a
> [<c027e599>] register_netdev+0x37/0x44
> [<c03ce7fb>] loopback_net_init+0x38/0x7d
> [<c027bb59>] register_pernet_operations+0x18/0x1a
> [<c027bbd3>] register_pernet_device+0x24/0x51
> [<c03ce7c1>] loopback_init+0x12/0x14
> [<c03b9721>] kernel_init+0x80/0x227
> [<c0103c13>] kernel_thread_helper+0x7/0x10
> [<ffffffff>] 0xffffffff
rtnl_lock
cls->mutex
> -> #0 (rtnl_mutex){--..}:
> [<c013fb8e>] __lock_acquire+0xad9/0x103b
> [<c0140169>] lock_acquire+0x79/0x92
> [<c02cfcd5>] mutex_lock_nested+0x90/0x290
> [<c02870f1>] rtnl_lock+0x14/0x16
> [<c027e04d>] unregister_netdev+0x10/0x1f
> [<ded9d11f>] orinoco_cs_detach+0x20/0x32 [orinoco_cs]
> [<ded5775a>] pcmcia_device_remove+0x3c/0xcf [pcmcia]
> [<c0250efe>] __device_release_driver+0x5e/0x84
> [<c0250fe2>] device_release_driver+0x20/0x2b
> [<c0250434>] bus_remove_device+0x73/0x8b
> [<c024ef95>] device_del+0xdb/0x14b
> [<c024f015>] device_unregister+0x10/0x1a
> [<ded5768e>] pcmcia_card_remove+0x76/0x8c [pcmcia]
> [<ded5825d>] ds_event+0x59/0x9e [pcmcia]
> [<c025ffa6>] send_event+0x7c/0xa8
> [<c02601da>] socket_remove_drivers+0x17/0x19
> [<c02601ef>] socket_shutdown+0x13/0xcc
> [<c02602d3>] socket_remove+0x2b/0x31
> [<c026098f>] pccardd+0x236/0x28c
> [<c01318bb>] kthread+0x3b/0x5d
> [<c0103c13>] kernel_thread_helper+0x7/0x10
> [<ffffffff>] 0xffffffff
cls->mutex
rtnl_lock
> other info that might help us debug this:
>
> 1 lock held by pccardd/1037:
> #0: (&socket->skt_mutex){--..}, at: [<c02608ba>] pccardd+0x161/0x28c
>
> stack backtrace:
> Pid: 1037, comm: pccardd Not tainted 2.6.26-rc2-mm1 #2
> [<c013d8d6>] print_circular_bug_tail+0x68/0x71
> [<c013cfd5>] ? print_circular_bug_entry+0x43/0x4b
> [<c013fb8e>] __lock_acquire+0xad9/0x103b
> [<c013f42f>] ? __lock_acquire+0x37a/0x103b
> [<c013f42f>] ? __lock_acquire+0x37a/0x103b
> [<c0108587>] ? native_sched_clock+0x66/0xaf
> [<c0140169>] lock_acquire+0x79/0x92
> [<c02870f1>] ? rtnl_lock+0x14/0x16
> [<c02cfcd5>] mutex_lock_nested+0x90/0x290
> [<c02870f1>] ? rtnl_lock+0x14/0x16
> [<c02870f1>] ? rtnl_lock+0x14/0x16
> [<c02870f1>] rtnl_lock+0x14/0x16
> [<c027e04d>] unregister_netdev+0x10/0x1f
> [<ded9d11f>] orinoco_cs_detach+0x20/0x32 [orinoco_cs]
> [<ded5775a>] pcmcia_device_remove+0x3c/0xcf [pcmcia]
> [<c0250efe>] __device_release_driver+0x5e/0x84
> [<c0250fe2>] device_release_driver+0x20/0x2b
> [<c0250434>] bus_remove_device+0x73/0x8b
> [<c024ef95>] device_del+0xdb/0x14b
> [<c024f015>] device_unregister+0x10/0x1a
> [<ded5768e>] pcmcia_card_remove+0x76/0x8c [pcmcia]
> [<ded5825d>] ds_event+0x59/0x9e [pcmcia]
> [<c02601da>] ? socket_remove_drivers+0x17/0x19
> [<c025ffa6>] send_event+0x7c/0xa8
> [<c02601da>] socket_remove_drivers+0x17/0x19
> [<c02601ef>] socket_shutdown+0x13/0xcc
> [<c0120d15>] ? printk+0x20/0x22
> [<c02602d3>] socket_remove+0x2b/0x31
> [<c026098f>] pccardd+0x236/0x28c
> [<c02cf0e8>] ? schedule+0x2c4/0x46f
> [<c011b3eb>] ? sub_preempt_count+0x76/0xbd
> [<c011b15f>] ? default_wake_function+0x0/0x12
> [<c0260759>] ? pccardd+0x0/0x28c
> [<c01318bb>] kthread+0x3b/0x5d
> [<c0131880>] ? kthread+0x0/0x5d
> [<c0103c13>] kernel_thread_helper+0x7/0x10
This bug has always been there, and is now exposed by the conversion
of cls->mutex from a semaphore to a mutex. Because lockdep doesn't
check semaphores.
I don't know how to get this fixed, sorry. I'll just push
struct-class-sem-to-mutex-converting.patch at Greg until it sticks,
then it will go into mainline, then we'll get a shower of bug reports,
including this one, then someone someday will do soemthing about it.
Fun.
prev parent reply other threads:[~2008-05-20 10:23 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 8:01 2.6.26-rc2-mm1 Andrew Morton
2008-05-14 11:24 ` [BUG] 2.6.26-rc2-mm1 - kernel bug while bootup at __alloc_pages_internal () on x86_64 Kamalesh Babulal
2008-05-14 17:36 ` Andrew Morton
2008-05-14 18:21 ` Kamalesh Babulal
2008-05-14 19:44 ` Andrew Morton
2008-05-15 1:54 ` KAMEZAWA Hiroyuki
2008-05-18 8:00 ` Kamalesh Babulal
2008-05-18 17:07 ` KOSAKI Motohiro
2008-05-19 14:49 ` Lee Schermerhorn
2008-05-14 14:03 ` [BUG] 2.6.26-rc2-mm1 - kernel BUG at fs/reiserfs/journal.c:1414! Kamalesh Babulal
2008-05-14 18:01 ` Andrew Morton
2008-05-14 15:34 ` [BUG] 2.6.26-rc2-mm1 - kernel panic at inet_create() on powerpc Kamalesh Babulal
2008-05-14 16:07 ` Paul E. McKenney
2008-05-14 20:05 ` Alexey Dobriyan
2008-05-14 20:32 ` Paul E. McKenney
2008-05-14 18:29 ` 2.6.26-rc2-mm1: sparc64 - possible recursive locking detected Mariusz Kozlowski
2008-05-14 18:41 ` Andrew Morton
2008-05-14 18:50 ` Mariusz Kozlowski
2008-05-14 19:12 ` 2.6.26-rc2-mm1 Torsten Kaiser
2008-05-14 19:35 ` 2.6.26-rc2-mm1 Andrew Morton
2008-05-15 17:44 ` 2.6.26-rc2-mm1 Torsten Kaiser
2008-05-15 18:49 ` 2.6.26-rc2-mm1 Andrew Morton
2008-05-14 20:39 ` 2.6.26-rc2-mm1 (WARN() build error) Randy Dunlap
2008-05-14 20:43 ` 2.6.26-rc2-mm1 (CONFIG_*FD build errors) Randy Dunlap
2008-05-14 20:49 ` 2.6.26-rc2-mm1 Zan Lynx
2008-05-14 21:00 ` 2.6.26-rc2-mm1 Andrew Morton
2008-05-14 21:14 ` 2.6.26-rc2-mm1 me
2008-05-14 22:06 ` 2.6.26-rc2-mm1 Zan Lynx
2008-05-14 21:13 ` 2.6.26-rc2-mm1 (SCSI_DH build errors) Randy Dunlap
2008-05-15 14:46 ` James Bottomley
2008-05-15 19:56 ` Chandra Seetharaman
2008-05-23 3:25 ` Andrew Morton
2008-05-23 19:39 ` Chandra Seetharaman
2008-05-23 20:28 ` Randy Dunlap
2008-05-24 1:16 ` Chandra Seetharaman
2008-05-14 21:16 ` 2.6.26-rc2-mm1: sloooow mkfs.ext2 Alexey Dobriyan
2008-05-14 21:33 ` Alexey Dobriyan
2008-05-15 21:41 ` Jiri Slaby
2008-05-14 21:16 ` 2.6.26-rc2-mm1 (p9 build error when 9P_FS=n) Randy Dunlap
2008-05-15 0:00 ` Eric Van Hensbergen
2008-05-15 0:05 ` Andrew Morton
2008-05-15 2:29 ` Eric Van Hensbergen
2008-05-15 3:04 ` Andrew Morton
2008-05-15 3:53 ` Eric Van Hensbergen
2008-05-14 21:54 ` 2.6.26-rc2-mm1 Rafael J. Wysocki
2008-05-15 17:58 ` [PATCH] Re: 2.6.26-rc2-mm1 - fix parenthesis in include/asm-arm/arch-omap/control.h Mariusz Kozlowski
2008-05-15 17:59 ` [PATCH] Re: 2.6.26-rc2-mm1 - fix parenthesis in include/asm-mips/gic.h Mariusz Kozlowski
2008-05-15 18:01 ` [PATCH] Re: 2.6.26-rc2-mm1 - fix parenthesis in include/asm-mips/mach-au1x00/au1000.h Mariusz Kozlowski
2008-05-15 18:21 ` [BUG] Re: 2.6.26-rc2-mm1 - x86_32 oops on modprobe wusbcore Mariusz Kozlowski
2008-05-15 18:58 ` Andrew Morton
2008-05-15 20:05 ` Inaky Perez-Gonzalez
2008-05-16 22:17 ` 2.6.26-rc2-mm1: high speed something Alexey Dobriyan
2008-05-16 21:31 ` Andrew Morton
2008-05-16 22:00 ` Greg KH
2008-05-17 10:28 ` 2.6.26-rc2-mm1 and Linus -git: LEDS_TRIGGER_DEFAULT_ON odd default Valdis.Kletnieks
2008-05-19 11:33 ` 2.6.26-rc2-mm1 - machine stuck while booting up with CONFIG_FTRACE_STARTUP_TEST enabled Kamalesh Babulal
2008-05-19 13:02 ` Steven Rostedt
2008-05-19 14:08 ` Kamalesh Babulal
2008-05-19 14:38 ` Steven Rostedt
2008-05-20 10:01 ` 2.6.26-rc2-mm1: possible circular locking dependency detected Mariusz Kozlowski
2008-05-20 10:22 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080520032248.a4374951.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.kozlowski@tuxland.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox