Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2201452yba; Mon, 6 May 2019 01:22:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmK00a0M+CZZ1Ovcva+Onv8x824jRlyGOlJjHJh2Tigp7QnsztRMjD7SiB3NR+mZHDmluj X-Received: by 2002:a17:902:2827:: with SMTP id e36mr29906326plb.45.1557130927595; Mon, 06 May 2019 01:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557130927; cv=none; d=google.com; s=arc-20160816; b=qefS7Tsl3WhWbhFKAOur3gcYF4XBY7BgpOGAimWBt1bY65ZzVH9UiE11ebK8e8MBwi KRyfvVpjdHutcmcL63Us0Rw6uLFCYsgurA4SMaoVeXHtiY94wMBKrGP5N5fPznhCF4Nl xum1LNnvw3SxfRxM383paq1WG9D1rZ01xLOE7SbueyUor7QD3LVXCn0lMTDn2iuz1Dr8 GT9VmC8zkY7QHLPhrdx8a9GX5heQolrnxdegeQw26D8El/ihVEwltm8bTluI3IoqN2DF uhl2vnnGdHSbDwbTIAhy5SbqzoOgTVp+4bSaH1dDzDNI4Fgey6QJj6I7g8QIoUcVf0g+ pLxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gwGyhQTcOWIi3KiN6SpFfHsSobNA+w5/u1qWdgTp7UQ=; b=HSpJ/XJd/Hsr+ieD+IpopTEh3QsgAUOmou2mVY3fJ0/Y+bWrL+sjW/TVufESJiTojB Adfwa4nJjGyG0XJlxu2fRMGqFOCsMu0ywjB6EudpZbAq9CaUH2vByYy2zfr2ErVMm+Ex dCNAf2Xf8lFw4gf7vJTaxKBqiZN5Mwfu/a4hFxx3QoljW3DF5dBp9Ut1nYym0YFsI5bU jN9Y2HsmuiLWj5C67RObkY40Bt8Yx7up5h+NBa401WWMICbRyUa3FEIb1+V2txUFW61o nl2Q1qrXB/m7nxJbu6qXa3hW7nC23pwcQhtzLNjXtMLDh3GgVWOVFu1ez8EJKaWpZgrC 2v1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=npsaFU9W; 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 o6si14608275pgm.317.2019.05.06.01.21.52; Mon, 06 May 2019 01:22:07 -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=npsaFU9W; 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 S1726571AbfEFIUa (ORCPT + 99 others); Mon, 6 May 2019 04:20:30 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41641 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbfEFIUZ (ORCPT ); Mon, 6 May 2019 04:20:25 -0400 Received: by mail-pg1-f194.google.com with SMTP id z3so2386553pgp.8 for ; Mon, 06 May 2019 01:20:24 -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 :mime-version:content-transfer-encoding; bh=gwGyhQTcOWIi3KiN6SpFfHsSobNA+w5/u1qWdgTp7UQ=; b=npsaFU9WXA59NTCLcX0Wjx+OQV/XcxiWKTrM72/wE8hfV1H6dGaMHFSeuq8w5vhqyc d2zNN8WL8ERVwM1V8h1EKENcDdX+/+pWOv0gONIS1JGtORj53i+n2zflib108QKqwqdW UVzki3T7QgKbxT8gAHdkntc5c8ig+rvJWZQ8coya0TfgzGdsRyHZnhXa3q1DVOAHZ/vE irDjOjwKi2AqMhSMoo39u3FlZHRjSQyoCZmmjVGqOWSX39nxmVV4QoXrYtGf//0d6Sup EXE130jRxh3e0WUdt5UTYvUDxiGKiDv+H1Asqb8nLEX11e6JajX6KQFdEDkuhTd0YCSQ 1dmg== 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:mime-version:content-transfer-encoding; bh=gwGyhQTcOWIi3KiN6SpFfHsSobNA+w5/u1qWdgTp7UQ=; b=jnIF5ErHtbhRq7GgXOABN5VSK5UeejovENOlNqxfa1Ez70KPkKMyJk2b4hnRB8Saz3 RoNH/gIJSE5oW9Ecu+Tmlxy//+fdpALxWV4v+/RlTGdvLvc2YdT/H6BseCmxr9u8MZbn qi6UVBfwfDZc45ME4/QCoSIRJJlDrA+sCI4qekKw9O21jfuWKGveLQ97UDOa+ANabzp9 siuqKnvbRRk1M8r97CDI2NV0jCw98A+MSCsTuZSa2TKuJQyDxgvP55lT6BvTsuWeIVM6 Cb3ZKF4Y77iaRPkcUwxuF1obSg/SYqUHIhFPTdsTPcX/PgA2h650buhHXtuJe2EkLWtp 8skA== X-Gm-Message-State: APjAAAX3lNjhjfn4qLi6CfaKaZ0zVMG2284g+8CuuIwtFWfl60q/ldJv 5leqReQLgjfBy2oqa8A/FExXb9yAU7pLqw== X-Received: by 2002:a63:3fc1:: with SMTP id m184mr30002102pga.222.1557130824473; Mon, 06 May 2019 01:20:24 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id v19sm20958013pfa.138.2019.05.06.01.20.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 01:20:23 -0700 (PDT) From: Yuyang Du To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: bvanassche@acm.org, ming.lei@redhat.com, frederic@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, Yuyang Du Subject: [PATCH v2 11/23] locking/lockdep: Update comment Date: Mon, 6 May 2019 16:19:27 +0800 Message-Id: <20190506081939.74287-12-duyuyang@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190506081939.74287-1-duyuyang@gmail.com> References: <20190506081939.74287-1-duyuyang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A leftover 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 aa36502..b8e6ba3 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2806,10 +2806,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