From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753570AbdAROOs (ORCPT ); Wed, 18 Jan 2017 09:14:48 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:39042 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752402AbdAROOq (ORCPT ); Wed, 18 Jan 2017 09:14:46 -0500 Date: Wed, 18 Jan 2017 15:12:55 +0100 From: Peter Zijlstra To: "byungchul.park" Cc: "'Boqun Feng'" , mingo@kernel.org, tglx@linutronix.de, walken@google.com, kirill@shutemov.name, linux-kernel@vger.kernel.org, linux-mm@kvack.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, npiggin@gmail.com Subject: Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Message-ID: <20170118141255.GE6515@twins.programming.kicks-ass.net> References: <1481260331-360-1-git-send-email-byungchul.park@lge.com> <1481260331-360-16-git-send-email-byungchul.park@lge.com> <20170118064230.GF15084@tardis.cn.ibm.com> <20170118105346.GL3326@X58A-UD3R> <20170118110317.GC6515@twins.programming.kicks-ass.net> <20170118115428.GM3326@X58A-UD3R> <20170118120757.GD6515@twins.programming.kicks-ass.net> <008101d27184$7d3cbd00$77b63700$@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <008101d27184$7d3cbd00$77b63700$@lge.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 18, 2017 at 09:14:59PM +0900, byungchul.park wrote: > +Example 3: > + > + CONTEXT X CONTEXT Y > + --------- --------- > + mutex_lock A > + mutex_lock A > + mutex_unlock A > + wait_for_complete B /* DEADLOCK */ Each line (across both columns) is a distinct point in time after the line before. Therefore, this states that "mutex_unlock A" happens before "wait_for_completion B", which is clearly impossible. You don't have to remove everything after mutex_lock A, but the unlock must not happen before context Y does the unlock.