lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: possible circular locking dependency detected [was: linux-next: Tree for Aug 22]
On Wed, Aug 23, 2017 at 11:36:49AM +0900, Sergey Senozhatsky wrote:
> On (08/23/17 09:03), Byungchul Park wrote:
> [..]
>
> aha, ok
>
> > The report is talking about the following lockup:
> >
> > A work in a worker A task work on exit to user
> > ------------------ ---------------------------
> > mutex_lock(&bdev->bd_mutex)
> > mutext_lock(&bdev->bd_mutex)
> > blk_execute_rq()
> > wait_for_completion_io_timeout(&A)
> > complete(&A)
> >
> > Is this impossible?
>
> I was really confused how this "unlock" may lead to a deadlock

Hi Sergey,

Right. It should be enhanced.

>
> > > > other info that might help us debug this:
> > > > Possible unsafe locking scenario by crosslock:
> > > > CPU0 CPU1
> > > > ---- ----
> > > > lock(&bdev->bd_mutex);
> > > > lock((complete)&wait#2);
> > > > lock(&bdev->bd_mutex);
> > > > unlock((complete)&wait#2);
>
>
> any chance the report can be improved? mention timeout, etc?
> // well, if this functionality will stay.
>
>
> p.s.
> Bart Van Assche, thanks for Cc-ing Park Byungchul, I was really
> sure I didn't enabled the cross-release, but apparently I was wrong:
> CONFIG_LOCKDEP_CROSSRELEASE=y
> CONFIG_LOCKDEP_COMPLETIONS=y
>
> -ss

\
 
 \ /
  Last update: 2017-08-23 05:00    [W:0.697 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site