lkml.org 
[lkml]   [2017]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING: possible circular locking dependency detected
On Sat, 26 Aug 2017, Byungchul Park wrote:
> On Fri, Aug 25, 2017 at 11:47 PM, Sebastian Andrzej Siewior
> <bigeasy@linutronix.de> wrote:
> > We hold the sparse_irq_lock lock while waiting for the completion in the
> > CPU-down case and in the CPU-up case we acquire the sparse_irq_lock lock
> > while the other CPU is waiting for the completion.
> > This is not an issue if my interpretation of lockdep here is correct.
>
> Hello Sebastian,
>
> I think you parsed the message correctly.
>
> The message is saying that, for example:
>
> context A (maybe being up?)
> --
> lock(sparse_irq_lock) // wait for sparse_irq_lock in B to be released
> complete(st->done) // impossible to hit here
>
> context B (maybe wanting to synchronize with the cpu being up?)
> --
> lock(sparse_irq_lock) // acquired successfully
> wait_for_completion(st->done) // wait for completion of st->done in A
> unlock(sparse_irq_lock) // impossible to hit here
>
> I cannot check the kernel code at the moment.. I wonder if this scenario is
> impossible. Could you answer it?

Yes, it's impossible because cpu hotplug is globally serialized. So the cpu
down scenario cannot happen in parallel with the cpu up scenario.

Thanks,

tglx


\
 
 \ /
  Last update: 2017-08-25 18:21    [W:0.050 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site