Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp842830yba; Wed, 3 Apr 2019 22:04:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkY2bls6XTmFX2KR/lNHDBf9Lfwm9IEjuTo+rc2UmquaflHsJ2xCDBCu3hH0tP4+2KOGix X-Received: by 2002:a17:902:846:: with SMTP id 64mr4237315plk.266.1554354255889; Wed, 03 Apr 2019 22:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554354255; cv=none; d=google.com; s=arc-20160816; b=XKsH5o4+VYM68kNpmyC9dDkHSXEILWAWYPT1yYmFoYD+71sY7vWDPOQ74SqxE1eoag 5XTOKKCWg4r8pfJQtS7pValokG1I2V3n+ObZz3N9xAMBYRtDpCWiL5+jzbMosgUFLx8d RLw+ItO4oCPjr3mtpFHuwH6snVJbxHNFTCYn7DWxexsEHeWNWvRHTaNbzTJDRLleUQ/D KIUcR5Q2iR/UwIlFylQeW88xrFcwX0g8Hn3+cWcyvsYRqguadadYy0PmeFW71NJu0qzB A783GMq1lTKVVKOcum2dLJwdgdECzLO/i2nh7v5u9QI1Jl0EGuBg2P315hktiCNwoT71 xMRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1tBEXosrcvpGtRUaF1KwHY9bzibXQf+KNKFtwMzZlr0=; b=uQWC3724zpfg+9aomjZ3sx82+x9OTpif7ifuqOxGWrs202qxTZJ1z7gQCknn5HZF9/ sxE2ctsrkCzzexx3KM6iUeq032aYpjPKif7VDDTphUJjxMrIP0TylRKB1lwHhXZJ3ZSS wWSTB6FYplNnVPLg9zk1b+OcbAebAWG7DN9jIePqnONyuoYw7OXmKTL4pzyat2Wzu0Jv oc9CdqHni5pG27MtYcKGmXOCAdCjlT/Oj97KSxXHeLTms8A6GjO40rZh1JuPsTjGpdQc yoWb+i3xsYjfos6NhXgIKPOqKT8EjYk1/2t7rqR7W9OWu0f1N8zRbSuoJziv0N0JISWA ieTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GPduABOZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn14si2709097plb.7.2019.04.03.22.04.00; Wed, 03 Apr 2019 22:04:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GPduABOZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbfDDFDX (ORCPT + 99 others); Thu, 4 Apr 2019 01:03:23 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:34766 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbfDDFDX (ORCPT ); Thu, 4 Apr 2019 01:03:23 -0400 Received: by mail-qt1-f194.google.com with SMTP id k2so1835521qtm.1 for ; Wed, 03 Apr 2019 22:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1tBEXosrcvpGtRUaF1KwHY9bzibXQf+KNKFtwMzZlr0=; b=GPduABOZqaHKGD3PKF1ewSBgPwjUG75OUiCi4YyR6w6JdzOqEb0bW/n1H9k7yDAska RDugi4My1V5eBUk5KhBEPDP3v4mk8Da0LmrLcXGPJUsciGLxOUyEqR3T62Fv0Jn5NNeI DQYU7xMdKBd6aIxwHRVMMkNkDLUR0ncEkOHo0hxy3xluWYXixpeb3PL+t/ZAaMboyE42 6sQMOhvHr1A4SR30Cs1sJdRUDbXBiOD2VPxAD4i/InoLFcgCH+VsiT+qJPelgwoj2eh/ JLDeOUDygbrjM1mzNuR/Z5KKlp9Pk0GyDoTgxOoqSWrOVZDJqg69rVtnG3zz3aukq+zc fJnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1tBEXosrcvpGtRUaF1KwHY9bzibXQf+KNKFtwMzZlr0=; b=G3uqBFuZackt7P8Ud0l81JJmhjTI+Z5L2tCD095tm15JYKbrNPGW+b6CZCuVDLZSb1 dY2qMT0yen9O+7w9vgFuaoNIzhxV+i2bcmPFAW5aS3g1HfPacVSfvYPFPfAwHY8CkRC/ Kt31kW2GqWhDrlFXnnpVRZE20RA4MrrI/klE4kw7f3htPu3CMIHOpy3tgiMSs3awYJw7 kaE9u2wGi/7/QKALRFXZKnusyrMlvyXJXuHCxLpwOqdREgloFBKmDd73MAswb75gM9xS 1L3CenvIaL1ffmNA86TUqXPbqU/FKgiCko8owTzk/R3X8HKF0Q6wyf57N7DoQPbGSxS3 2+uw== X-Gm-Message-State: APjAAAUB/4SqXVwGsMx9eRSq/KfVTfPapizlNAnUl1Y3NCE4CmfNJqn/ apmHqe6DDDR5ehtFu1TThnbWrl5ssdQEsgfrIH8= X-Received: by 2002:a0c:ba99:: with SMTP id x25mr3014018qvf.212.1554354202149; Wed, 03 Apr 2019 22:03:22 -0700 (PDT) MIME-Version: 1.0 References: <20190321075725.14054-1-duyuyang@gmail.com> <20190321075725.14054-19-duyuyang@gmail.com> In-Reply-To: <20190321075725.14054-19-duyuyang@gmail.com> From: Yuyang Du Date: Thu, 4 Apr 2019 13:03:10 +0800 Message-ID: Subject: Question on a lockdep test case about mixed read-write ABBA To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: Bart Van Assche , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, I observed this test case you wrote in Commit: e9149858974606 ("locking/lockdep/selftests: Add mixed read-write ABBA"). static void rwsem_ABBA2(void) { RSL(X1); ML(Y1); MU(Y1); RSU(X1); ML(Y1); RSL(X1); RSU(X1); MU(Y1); // should fail } Why should it fail? This is not a deadlock, right? The depencencies would be built by lockdep though; that results in a false positive. Thanks, Yuyang