Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp240488img; Mon, 18 Mar 2019 02:00:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQGMKS0q5IK7qrtYvwXn3f88vXCYu4QASA3WD87r9KwdELPJdEIEcNg62GjYbHOQaDN4Gn X-Received: by 2002:aa7:811a:: with SMTP id b26mr17754553pfi.250.1552899612120; Mon, 18 Mar 2019 02:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552899612; cv=none; d=google.com; s=arc-20160816; b=QmeBd7uJfD5TRG3JzxJyDXWYae5FTcf/J+puyvuJ79+zQElEE3Saqvj6FpO8rmlMUU 8lX1TDjuqkFu4+74lBVoweq85VoGg0G46ELwN75J792nGmfPSkLqpfe/eyUOsfEzdHHk iNqZPDFg8U+v7ixdO+/34UwhccXR7nMa8SqV4gkzFb6VKN4Ego6Fn3iF8MP7tOacSRRo O5OQtLqoKXFK+p4l3kiJ1l/1CtdQkrWZjIfG9OXD71ksjRTG3b+eJRtN2U7NnfkYZxZm syeZX+QpSPVochCYY2DZ8uhXipXhBY+wAzLByxj2BXqztmB4tI4UTJGj66KpMFCHfoxP wwng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=HZtu1dgITnZTUGFaUngQpYQEU/UJAEfhiDxYPu729A8=; b=yUA3UfhMOzGSriSSe5On+BTEafOOjeGHWnfXgVnu/D35qN0t5PDcVy9pEyGL+5YOb2 SM3hTgnudBOhxT0VLfq/JPpder9jc6sVjG6O80ezVf9a4hiP/Ck4rauq8FbkYn57Dq3B vQOxf2trTw8xagC+BZu5OXyHjl1g7cGp12N6KCJxaJ0rL9z7uPYFZBhOmNGnwpQpDQNd Is8h+7t6lFxARoo8FgS4cW5umB9imF/n1DamXzdRMXkIwCWqlVsoMFfHTKI13O4HfokL COEZBdGsKuzHJUwKPciBUvAUj5hzgg37AZxdgmiRkwGZER713+18K5sCLBzF1XAxX7v2 REUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jF5G5RXm; 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 c12si7924297pgi.137.2019.03.18.01.59.56; Mon, 18 Mar 2019 02:00:12 -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=jF5G5RXm; 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 S1727130AbfCRI6T (ORCPT + 99 others); Mon, 18 Mar 2019 04:58:19 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32932 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727429AbfCRI6R (ORCPT ); Mon, 18 Mar 2019 04:58:17 -0400 Received: by mail-pg1-f194.google.com with SMTP id i7so7708313pgq.0 for ; Mon, 18 Mar 2019 01:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HZtu1dgITnZTUGFaUngQpYQEU/UJAEfhiDxYPu729A8=; b=jF5G5RXmbh2pKZRfGIv5zBhsCCaSTcopeQiY+lLygdWh5Y50Fg1PN8FHnQAX/u8X2U uOIRWRdzaenR3wBAy3loc5PCrjSz/Gu2fdYWugeDrDCyTow3aS+wd47QN0JOBUXAZgMs jZv/Yohi/bcS5Z9gx+DK6FeRisa3stlK+r5NPNQZnMwXwl0KHwoozQwRDevV8KsYjM4i lzSKhFD1oMF/LcQXCjjSZOPVuyeT9BMk/AN+d/Zl/vGQ7pY0tpF1BtATf62EZ/Ygdvhe 8ZvbQVRH4FJatuEkClZhKKQr9yrMK3nvEXyoY5C8hIdO8TmBQmLfp1uEi/HGQxh1muWd kPjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HZtu1dgITnZTUGFaUngQpYQEU/UJAEfhiDxYPu729A8=; b=hjDogFSKN82h0bM3/nixBdTiCLoTBIcOHi1ec/RiRrLWcl0EwC2T71+RBA4xUlzHb5 rf96T7GmrW5ttOlal+pJaIeljOCWo/iQ3t7EeZVb18nNYJjpHDbHdhLMLIV4Wg/D0syN CiUGm6hoAlCrsmd0UPFB6VxS8/Iz23sVMYYyu5fTipJD1PnsynqG6+jod9jbKVy6gqKY e8RoQFEfeTh2OwV4D9T+FNe6Et/jNGMk8LR1tb4e+yIZ/GFzN+635ZCkadGR3jSorgbH JdIMHbCYahOpmP3ap7VO4n6QzG3i+Hv1UoBG6dk1jdPNc7ITifOOGC2n55mI7xaTMBTP oXrg== X-Gm-Message-State: APjAAAWNo94D9RATGLQW5OxtCJZb3CLYUKDsYvNu0w7AeiBZSLjWp6i3 8lWeQixM0V0Z3UD13bxOR8WXVIUAF8jhWw== X-Received: by 2002:a17:902:b097:: with SMTP id p23mr18612945plr.36.1552899497274; Mon, 18 Mar 2019 01:58:17 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id k8sm11147024pgq.37.2019.03.18.01.58.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 01:58:16 -0700 (PDT) From: Yuyang Du To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: bvanassche@acm.org, ming.lei@redhat.com, linux-kernel@vger.kernel.org, Yuyang Du Subject: [PATCH v2 12/19] locking/lockdep: Update comment Date: Mon, 18 Mar 2019 16:57:26 +0800 Message-Id: <20190318085733.3143-13-duyuyang@gmail.com> X-Mailer: git-send-email 2.17.2 (Apple Git-113) In-Reply-To: <20190318085733.3143-1-duyuyang@gmail.com> References: <20190318085733.3143-1-duyuyang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org An out-of-nowhere comment is removed. While at it, add more explanatory comments. Such a trivial patch! Signed-off-by: Yuyang Du --- 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 dcff644..250ba64 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2717,10 +2717,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); -- 1.8.3.1