All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qing Huang <qing.huang@oracle.com>
To: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Grant Likely <grant.likely@linaro.org>,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] device probe: add self triggered delayed work request
Date: Mon, 8 Aug 2016 17:10:05 -0700	[thread overview]
Message-ID: <57A91F5D.1060605@oracle.com> (raw)
In-Reply-To: <20160808104250.GA12480@shamir-linux.uk.oracle.com>



On 08/08/2016 03:42 AM, Shamir Rabinovitch wrote:
> Hi Qing,
>
> I suspect there is potential dead-lock with this patch:
>
> cpu0                                                    cpu1
>
> driver_deferred_probe_add                               deferred_probe_work_func
>   ...                                                     mutex_unlock(&deferred_probe_mutex)
>   mutex_lock(&deferred_probe_mutex)                        bus_probe_device(dev)
>    ...                                                      device return -EPROBE_DEFER
>    ...                                                       driver_deferred_probe_add
>    ...                                                        mutex_lock(&deferred_probe_mutex)
>    ...                                                         <deadlock!>
>    cancel_delayed_work(&deferred_probe_trigger_work)
>     <work will never end - deadlock!>
Not sure if I understood your scenario. Why there is a deadlock here?

>
> Please confirm if this scenario is possible.
>
> BR, Shamir Rabinovitch

  reply	other threads:[~2016-08-09  0:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 10:42 [PATCH] device probe: add self triggered delayed work request Shamir Rabinovitch
2016-08-09  0:10 ` Qing Huang [this message]
2016-08-09 10:11   ` Shamir Rabinovitch
2016-08-09 20:57     ` Qing Huang
  -- strict thread matches above, loose matches on Subject: below --
2016-07-30  5:39 Qing Huang
2016-08-08 20:44 ` Frank Rowand
2016-08-08 21:51   ` Qing Huang
2016-08-09  1:11     ` Frank Rowand
2016-08-09  1:15       ` Santosh Shilimkar
2016-08-09  7:16         ` Frank Rowand

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=57A91F5D.1060605@oracle.com \
    --to=qing.huang@oracle.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santosh.shilimkar@oracle.com \
    --cc=shamir.rabinovitch@oracle.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.