From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752894AbdJKSuS (ORCPT ); Wed, 11 Oct 2017 14:50:18 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52614 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532AbdJKSuQ (ORCPT ); Wed, 11 Oct 2017 14:50:16 -0400 Date: Wed, 11 Oct 2017 20:50:14 +0200 From: Peter Zijlstra To: Jakub Kicinski Cc: LKML , Ingo Molnar Subject: Re: Locking API testsuite: mixed read-lock/lock-write ABBA: |FAILED| Message-ID: <20171011185014.bjtga3z6gsuigklt@hirez.programming.kicks-ass.net> References: <20171011112825.3c1325ac@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171011112825.3c1325ac@cakuba.netronome.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 11, 2017 at 11:28:25AM -0700, Jakub Kicinski wrote: > I'm seeing a failure on net-next kernels (rc4): > > [ 0.000000] -------------------------------------------------------------------------- > [ 0.000000] recursive read-lock: | ok | | ok | > [ 0.000000] recursive read-lock #2: | ok | | ok | > [ 0.000000] mixed read-write-lock: | ok | | ok | > [ 0.000000] mixed write-read-lock: | ok | | ok | > [ 0.000000] mixed read-lock/lock-write ABBA: |FAILED| | ok | > [ 0.000000] mixed read-lock/lock-read ABBA: | ok | | ok | > [ 0.000000] mixed write-lock/lock-write ABBA: | ok | | ok | > [ 0.000000] -------------------------------------------------------------------------- > > Is this OK? Yes, commit e91498589746065e3ae95d9a00b068e525eec34f Author: Peter Zijlstra Date: Wed Aug 23 13:13:11 2017 +0200 locking/lockdep/selftests: Add mixed read-write ABBA tests Currently lockdep has limited support for recursive readers, add a few mixed read-write ABBA selftests to show the extend of these limitations. [ 0.000000] ---------------------------------------------------------------------------- [ 0.000000] | spin |wlock |rlock |mutex | wsem | rsem | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] mixed read-lock/lock-write ABBA: |FAILED| | ok | [ 0.000000] mixed read-lock/lock-read ABBA: | ok | | ok | [ 0.000000] mixed write-lock/lock-write ABBA: | ok | | ok | This clearly illustrates the case where lockdep fails to find a deadlock. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: byungchul.park@lge.com Cc: david@fromorbit.com Cc: johannes@sipsolutions.net Cc: oleg@redhat.com Cc: tj@kernel.org Signed-off-by: Ingo Molnar