From: Ming Lei <tom.leiming@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@elte.hu>,
Zdenek Kabelac <zdenek.kabelac@gmail.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: INFO: possible circular locking dependency at cleanup_workqueue_thread
Date: Fri, 22 May 2009 16:03:32 +0800 [thread overview]
Message-ID: <d82e647a0905220103s23ad0feejfaa787dcd481a41c@mail.gmail.com> (raw)
In-Reply-To: <1242802064.31350.12.camel@johannes.local>
2009/5/20 Johannes Berg <johannes@sipsolutions.net>:
> On Wed, 2009-05-20 at 11:36 +0800, Ming Lei wrote:
>
>> > Anyway, you can have a deadlock like this:
>> >
>> > CPU 3 CPU 2 CPU 1
>> > suspend/hibernate
>> > something:
>> > rtnl_lock() device_pm_lock()
>> > -> mutex_lock(&dpm_list_mtx)
>> >
>> > mutex_lock(&dpm_list_mtx)
>>
>> Would you give a explaination why mutex_lock(&dpm_list_mtx) runs in CPU2
>> and depends on rtnl_lock?
>
> Why not? Something is registering a hotplugged netdev.
It seems dpm_list_mtx is held in kernel_init context, so should not consider
registering a hotplugged netdev, isn't it?
I am still confused, since rtnl_mutex is held before dpm_list_mtx which
is acquired in kernel_init context.
[ 562.689476] -> #3 (dpm_list_mtx){+.+.+.}:
[ 562.689480] [<ffffffff8026eae8>] __lock_acquire+0x13a9/0x171c
[ 562.689484] [<ffffffff8026ef5f>] lock_acquire+0x104/0x130
[ 562.689489] [<ffffffff804ab2f0>] mutex_lock_nested+0x6f/0x36b
[ 562.689493] [<ffffffff803f6395>] device_pm_add+0x4b/0xf2
[ 562.689499] [<ffffffff803ef382>] device_add+0x498/0x62a
[ 562.689503] [<ffffffff8043fd32>] netdev_register_kobject+0x7b/0x80
[ 562.689509] [<ffffffff80434761>] register_netdevice+0x2d0/0x469
[ 562.689514] [<ffffffff80434939>] register_netdev+0x3f/0x4d
[ 562.689519] [<ffffffff806f634f>] loopback_net_init+0x40/0x7d
[ 562.689524] [<ffffffff8042ee79>] register_pernet_device+0x32/0x5f
[ 562.689528] [<ffffffff806fb41a>] net_dev_init+0x143/0x1a1
[ 562.689533] [<ffffffff80209080>] do_one_initcall+0x75/0x18a
[ 562.689538] [<ffffffff806d0678>] kernel_init+0x138/0x18e
[ 562.689542] [<ffffffff8020c33a>] child_rip+0xa/0x20
[ 562.689546] [<ffffffffffffffff>] 0xffffffffffffffff
>
> johannes
>
--
Lei Ming
next prev parent reply other threads:[~2009-05-22 8:04 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 7:59 INFO: possible circular locking dependency at cleanup_workqueue_thread Zdenek Kabelac
2009-05-17 7:18 ` Ingo Molnar
2009-05-17 10:42 ` Ming Lei
2009-05-17 11:18 ` Johannes Berg
2009-05-17 13:10 ` Ingo Molnar
2009-05-18 19:47 ` Oleg Nesterov
2009-05-18 20:00 ` Peter Zijlstra
2009-05-18 20:16 ` Oleg Nesterov
2009-05-18 20:40 ` Peter Zijlstra
2009-05-18 22:14 ` Oleg Nesterov
2009-05-19 9:13 ` Peter Zijlstra
2009-05-19 10:49 ` Peter Zijlstra
2009-05-19 14:53 ` Oleg Nesterov
2009-05-19 8:51 ` Johannes Berg
2009-05-19 12:00 ` Oleg Nesterov
2009-05-19 15:33 ` Johannes Berg
2009-05-19 16:09 ` Oleg Nesterov
2009-05-19 16:27 ` Johannes Berg
2009-05-19 18:51 ` Oleg Nesterov
2009-05-22 10:46 ` Johannes Berg
2009-05-22 22:23 ` Rafael J. Wysocki
2009-05-23 8:21 ` Johannes Berg
2009-05-23 23:20 ` Rafael J. Wysocki
2009-05-24 3:29 ` Ming Lei
2009-05-24 11:09 ` Rafael J. Wysocki
2009-05-24 12:48 ` Ming Lei
2009-05-24 19:09 ` Rafael J. Wysocki
2009-05-24 14:30 ` Alan Stern
2009-05-24 19:06 ` Rafael J. Wysocki
2009-05-20 3:36 ` Ming Lei
2009-05-20 6:47 ` Johannes Berg
2009-05-20 7:09 ` Ming Lei
2009-05-20 7:12 ` Johannes Berg
2009-05-20 8:21 ` Ming Lei
2009-05-20 8:45 ` Johannes Berg
2009-05-22 8:03 ` Ming Lei [this message]
2009-05-22 8:11 ` Johannes Berg
2009-05-20 12:18 ` Peter Zijlstra
2009-05-20 13:18 ` Oleg Nesterov
2009-05-20 13:44 ` Peter Zijlstra
2009-05-20 13:55 ` Oleg Nesterov
2009-05-20 14:12 ` Peter Zijlstra
2009-05-24 18:58 ` Peter Zijlstra
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=d82e647a0905220103s23ad0feejfaa787dcd481a41c@mail.gmail.com \
--to=tom.leiming@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=rjw@sisk.pl \
--cc=zdenek.kabelac@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).