Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751264AbdIEKwq (ORCPT ); Tue, 5 Sep 2017 06:52:46 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:34861 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbdIEKwn (ORCPT ); Tue, 5 Sep 2017 06:52:43 -0400 Date: Tue, 5 Sep 2017 12:52:36 +0200 From: Peter Zijlstra To: Byungchul Park Cc: Byungchul Park , Ingo Molnar , Tejun Heo , Boqun Feng , david@fromorbit.com, Johannes Berg , oleg@redhat.com, "linux-kernel@vger.kernel.org" , kernel-team@lge.com Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation Message-ID: <20170905105236.5qynhkguxzzqued4@hirez.programming.kicks-ass.net> References: <20170901163852.ckslrgldsalqmg3c@hirez.programming.kicks-ass.net> <20170904013031.GM3240@X58A-UD3R> <20170904114248.kls4jv2ggsv46mli@hirez.programming.kicks-ass.net> <20170905003844.GO3240@X58A-UD3R> <20170905070825.tovfkqvxpwosh5oa@hirez.programming.kicks-ass.net> <20170905071930.h6t2f4guvmswibnv@hirez.programming.kicks-ass.net> <20170905085727.GV3240@X58A-UD3R> <20170905093624.zlwhvg32ahkpnamk@hirez.programming.kicks-ass.net> <20170905103144.GW3240@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170905103144.GW3240@X58A-UD3R> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 458 Lines: 14 On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote: > Let me show you a possible scenario with a leaf lock: > > lock(A) > lock(A) wait_for_completion(B) > unlock(A) ... > ... unlock(A) > process_one_work() > work->func() > complete(B) > > It's a deadlock by a lead lock A and completion B. By having wait_for_completion() in it, A is not a leaf lock.