lkml.org 
[lkml]   [2016]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] device probe: add self triggered delayed work request
On Mon, Aug 08, 2016 at 05:10:05PM -0700, Qing Huang wrote:
>
> Not sure if I understood your scenario. Why there is a deadlock here?
>

CPU0 | CPU1
---------------------------------------------------------------------------------------------
driver_deferred_probe_add | driver_deferred_probe_trigger_wrapper
mutex_lock(&deferred_probe_mutex) | driver_deferred_probe_trigger
cancel_delayed_work(&deferred_probe_trigger_work) | mutex_lock(&deferred_probe_mutex)
wait for "driver_deferred_probe_trigger_wrapper" | wait for "deferred_probe_mutex"

is this possible scenario with this patch?

if yes then CPU0 will wait for CPU1 to finish the delayed work whith
mutex deferred_probe_mutex held while CPU1 will try to finish the
delayed work and will wait for the same mutex forever.

it seems like dead lock scenario to me.

please say if this scenario is possible.

BR, Shamir Rabinovitch

\
 
 \ /
  Last update: 2016-08-09 12:41    [W:0.044 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site