Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934385AbdHYQVQ (ORCPT ); Fri, 25 Aug 2017 12:21:16 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:42199 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934151AbdHYQVP (ORCPT ); Fri, 25 Aug 2017 12:21:15 -0400 Date: Fri, 25 Aug 2017 18:21:05 +0200 (CEST) From: Thomas Gleixner To: Byungchul Park cc: Sebastian Andrzej Siewior , Borislav Petkov , Byungchul Park , Peter Zijlstra , lkml , kernel-team@lge.com Subject: Re: WARNING: possible circular locking dependency detected In-Reply-To: Message-ID: References: <20170825100304.5cwrlrfwi7f3zcld@pd.tnic> <20170825144755.ms2h2j2xe6gznnqi@linutronix.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1216 Lines: 35 On Sat, 26 Aug 2017, Byungchul Park wrote: > On Fri, Aug 25, 2017 at 11:47 PM, Sebastian Andrzej Siewior > 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