[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170118141255.GE6515@twins.programming.kicks-ass.net>
Date:   Wed, 18 Jan 2017 15:12:55 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     "byungchul.park" <byungchul.park@....com>
Cc:     'Boqun Feng' <boqun.feng@...il.com>, mingo@...nel.org,
        tglx@...utronix.de, walken@...gle.com, kirill@...temov.name,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
        npiggin@...il.com
Subject: Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation
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.
Powered by blists - more mailing lists
 
