Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4132134ybi; Mon, 3 Jun 2019 06:15:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzi1k1TCHgKmIBLONvvq+Xynkybm/bSiE32npzVNA49P/OporWGunQQNWkM1HK/oqP83CqX X-Received: by 2002:a63:f44f:: with SMTP id p15mr27963593pgk.65.1559567755826; Mon, 03 Jun 2019 06:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559567755; cv=none; d=google.com; s=arc-20160816; b=Oziz+tGXWGb3MIJl97mY1IBmxnHBB3TGFk+DIssYulnQAfpY8yN6V9llGAyffmrFBW m+avacyHLitewtT137FKUpvwT8m3XTZlrVTjbtg/BOQ7jze02xJZnHqJIqEMLFTIppjZ jQC+rnpp2BFfiZ0b6qt5LOIU3Ubrn07D80Zco3oEBEt++lNYjTNPlrJ7pJSzqG0J+/Nb faYTDJql/HCPnstTzPFYhJ3ooC2Sc1WgJpLc5uGfDgAL40cZOpeMSfl2br0tLkaN26Ud oq0VDHliml//Xsh2WViVvayOxSZbn6WydaF99kL2DGQSfqzNX390uKQeIStkDtw/GLst U6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=iqoyqc/NdHYKAOJ/my9vvngtYiLdowTu1U7S6kROfsM=; b=naxD6rHPxmTYrXWWtkmy0Lj+3k5JuPvK44ppGnHk1JXUNwC0SaFjldLBxAZ/LSF4c6 n3+B999mrZrgBOHfVB5BPZpt4kF42ssvP/lYVjQ/LeFqmR2uWG/DkvxgOjmWN5Vv5U0H t/5k9cEA3/Lq4xc5dQR1TfHaDPYOKAjXQQg1gKiwNf/A7/QPwa5ZiDoiRPI+VlgE9MW2 8lRSPkGPcPPS2x0VWzct1+QAb2zHb11l3F62xNwVJ/PS/RmmVO630YkOTDAzR8ar97Kn MTDTXZ4RLmutT03ElOwQysMEwC6UzMXfqGvaJf+iTUHBi1VScnOVqSafzcBiP/xJBLQB NWuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=gTVKkWX2; 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=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si17661633pjs.73.2019.06.03.06.15.37; Mon, 03 Jun 2019 06:15:55 -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=@zytor.com header.s=2019051801 header.b=gTVKkWX2; 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=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728175AbfFCNNu (ORCPT + 99 others); Mon, 3 Jun 2019 09:13:50 -0400 Received: from terminus.zytor.com ([198.137.202.136]:35307 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbfFCNNu (ORCPT ); Mon, 3 Jun 2019 09:13:50 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x53DDdWU605699 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 3 Jun 2019 06:13:39 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x53DDdWU605699 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019051801; t=1559567620; bh=iqoyqc/NdHYKAOJ/my9vvngtYiLdowTu1U7S6kROfsM=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=gTVKkWX2hw98JU/ogeEPt/Lta0OgnWncsWWQJRo8yXWYRXHAmbawHPlGLdmmFQlwi PSOg71SuaXPvbJDxH43xwiTgN9Y1yNyGKs+Qzsh+CXCeDX8urKiQxmKSiPzItVAojr pACSFoh+L2gQtRQZfGF9nT+kiRbkGvKYDeKuOE8FL6UQueQBzh8DHLYpKwEVKM8Ptj Y/wwZJbOCwkBf0hq3PgsPC89G9g3HjvrAp3X8VkgLCqt1IZTMKddze+xsD5TYu8M0h +z1DOuqt4U/D5u9O82E/b2PgGQYmBYrJM5AmxKehXoPUtI8dhzrd4FamdZLzSCgI1A ot7xd7AZ4z6iQ== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x53DDd8C605696; Mon, 3 Jun 2019 06:13:39 -0700 Date: Mon, 3 Jun 2019 06:13:39 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Yuyang Du Message-ID: Cc: duyuyang@gmail.com, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, tglx@linutronix.de Reply-To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, tglx@linutronix.de, duyuyang@gmail.com, hpa@zytor.com, mingo@kernel.org In-Reply-To: <20190506081939.74287-12-duyuyang@gmail.com> References: <20190506081939.74287-12-duyuyang@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/lockdep: Update comment Git-Commit-ID: 31a490e5c54f5499aa744f8524611e2a4b19f8ba X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 31a490e5c54f5499aa744f8524611e2a4b19f8ba Gitweb: https://git.kernel.org/tip/31a490e5c54f5499aa744f8524611e2a4b19f8ba Author: Yuyang Du AuthorDate: Mon, 6 May 2019 16:19:27 +0800 Committer: Ingo Molnar CommitDate: Mon, 3 Jun 2019 11:55:44 +0200 locking/lockdep: Update comment A leftover comment is removed. While at it, add more explanatory comments. Such a trivial patch! Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-12-duyuyang@gmail.com Signed-off-by: Ingo Molnar --- kernel/locking/lockdep.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 6cf14c84eb6d..a9799f9ed093 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2811,10 +2811,16 @@ static int validate_chain(struct task_struct *curr, * - is softirq-safe, if this lock is hardirq-unsafe * * And check whether the new lock's dependency graph - * could lead back to the previous lock. + * could lead back to the previous lock: * - * any of these scenarios could lead to a deadlock. If - * All validations + * - within the current held-lock stack + * - across our accumulated lock dependency records + * + * any of these scenarios could lead to a deadlock. + */ + /* + * The simple case: does the current hold the same lock + * already? */ int ret = check_deadlock(curr, hlock, hlock->read);