Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457699

Re: [PATCH] device probe: add self triggered delayed work request

Path csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod
From Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] device probe: add self triggered delayed work request
Date Mon, 08 Aug 2016 12:50:01 +0200
Message-ID <s3Qi5-e1-13@gated-at.bofh.it> (permalink)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
X-Source-IP aserv0022.oracle.com [141.146.126.234]
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 19
Organization linux.* mail to news gateway
X-Original-Cc Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Grant Likely <grant.likely@linaro.org>, Santosh Shilimkar <santosh.shilimkar@oracle.com>, linux-kernel@vger.kernel.org, shamir.rabinovitch@oracle.com
X-Original-Date Mon, 8 Aug 2016 13:42:51 +0300
X-Original-Message-ID <20160808104250.GA12480@shamir-linux.uk.oracle.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1457699

Show key headers only | View raw


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!>

Please confirm if this scenario is possible.

BR, Shamir Rabinovitch

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] device probe: add self triggered delayed work request Shamir Rabinovitch <shamir.rabinovitch@oracle.com> - 2016-08-08 12:50 +0200
  Re: [PATCH] device probe: add self triggered delayed work request Qing Huang <qing.huang@oracle.com> - 2016-08-09 02:10 +0200
    Re: [PATCH] device probe: add self triggered delayed work request Shamir Rabinovitch <shamir.rabinovitch@oracle.com> - 2016-08-09 12:20 +0200
      Re: [PATCH] device probe: add self triggered delayed work request Qing Huang <qing.huang@oracle.com> - 2016-08-09 23:00 +0200

csiph-web