From: Or Gerlitz <ogerlitz@mellanox.com>
To: Ming Lei <ming.lei@canonical.com>
Cc: Or Gerlitz <or.gerlitz@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
David Miller <davem@davemloft.net>,
Roland Dreier <roland@kernel.org>,
netdev <netdev@vger.kernel.org>, Yan Burman <yanb@mellanox.com>,
Jack Morgenstein <jackm@dev.mellanox.co.il>,
"Michael S. Tsirkin" <mst@redhat.com>,
Don Dutile <ddutile@redhat.com>, Tejun Heo <tj@kernel.org>
Subject: Re: hitting lockdep warning as of too early VF probe with 3.9-rc1
Date: Wed, 17 Apr 2013 18:14:48 +0300 [thread overview]
Message-ID: <516EBC68.1090802@mellanox.com> (raw)
In-Reply-To: <CACVXFVMcgMzwHrvimn2awQZCPP2m=_npTGap-m7Ru+jdCoqcyA@mail.gmail.com>
On 07/03/2013 04:03, Ming Lei wrote:
> On Thu, Mar 7, 2013 at 4:54 AM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
>> On Wed, Mar 6, 2013 at 4:43 AM, Ming Lei <ming.lei@canonical.com> wrote:
>>> You are adding one new PCI device inside another PCI device's probe(),
>>> so the new device will be probed, since PCI probe() is scheduled by
>>> work_on_cpu, then cause flush_work() called inside worker function,
>>> which might be a real deadlock.
>> So if I understand correct, you recommend to somehow avoid this nested probing?
> Yes, you might need to avoid the nested probing in your driver.
>
>>> I am wondering why this commit can cause the problem, since the PCI
>>> device will be probed with its driver if there is one driver for it. There is no
>>> any limit on when the driver should be loaded into system, either before
>>> device is added or after.
>> FWIW to undertstanding the issue - the same driver (mlx4_core) is used
>> by the PF and VF, so the VF driver is already loaded at the time its
>> been added as new PCI device.
>>
>>> From driver core view, looks no wrong things are found.
>> So this got me confused, you pointed on possible deadlock, are you
>> saying the deadlock wouldn't be the result of how the driver code is
>> going nor the commited we bisected?
> My commit only affects the driver loading path, but your warning
> is hit in driver probe path triggered by device addition, so the lockdep
> warning should still be triggered without my commit since the two paths
> are totally independent, right?
If this is the case, I am not sure how come we never saw this warning
before 3.9-rc1 which introduced your commit
190888ac01d059e38ffe77a2291d44cafa9016fb "driver core: fix possible
missing of device probe", any rough guess?
next prev parent reply other threads:[~2013-04-17 15:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 15:21 hitting lockdep warning as of too early VF probe with 3.9-rc1 Or Gerlitz
2013-03-06 2:43 ` Ming Lei
2013-03-06 20:54 ` Or Gerlitz
2013-03-07 2:03 ` Ming Lei
2013-03-10 15:28 ` Jack Morgenstein
2013-03-10 16:37 ` Greg Kroah-Hartman
2013-03-11 1:26 ` Ming Lei
2013-03-11 20:24 ` Ben Hutchings
2013-04-17 15:14 ` Or Gerlitz [this message]
2013-04-11 15:25 ` [PATCH for-3.9] pci: avoid work_on_cpu for nested SRIOV probes Michael S. Tsirkin
2013-04-18 20:08 ` [PATCHv2 " Michael S. Tsirkin
2013-04-18 21:40 ` Bjorn Helgaas
2013-04-18 21:57 ` Bjorn Helgaas
2013-04-19 14:36 ` Michael S. Tsirkin
[not found] ` <CAOS58YO+uV5KkS=sTP9Y3BPPh1nVnQ06yRyNU8GvEbym7R+X+Q@mail.gmail.com>
2013-04-19 16:39 ` Bjorn Helgaas
2013-04-20 19:05 ` Michael S. Tsirkin
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=516EBC68.1090802@mellanox.com \
--to=ogerlitz@mellanox.com \
--cc=davem@davemloft.net \
--cc=ddutile@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jackm@dev.mellanox.co.il \
--cc=ming.lei@canonical.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=or.gerlitz@gmail.com \
--cc=roland@kernel.org \
--cc=tj@kernel.org \
--cc=yanb@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.