Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp408193yba; Wed, 24 Apr 2019 03:27:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGzqUz27D5CjZFo6DrC3jBRrr6XKcvEFnlBwMwxNgwW9XWcxB3v9I713WLseRa92Q84RtD X-Received: by 2002:a17:902:3183:: with SMTP id x3mr31652415plb.170.1556101638003; Wed, 24 Apr 2019 03:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556101637; cv=none; d=google.com; s=arc-20160816; b=x3kmeH7fTWIq4bL7PKonUs8wlV4oCZDhh0aZV6zxVjBtbGgJNLxNGIGft2dePZEXne Uj43eu2e2T7zvZdxPxZcdasCkKoB3wZbeWYBlZOHuBuwO3GvpqRn29tT9dIQehBhEYOj kfNsoJvBqOXHXG/BmeRJ5cGQGtqkQqK2vwkrd4k43ToWrx+L7bl0OYcoHTEnNxzHAcjN dlXphUojrwyHXfVrB4xIeDKc5PsQosZ4ABPGuHKcEDzs1cDLQTPGmAVIU/zB4QgS0Geq YQ3QY+fOcKDFlyhSLoN+TgVbe6VIa5bU4SvLC9m5EPFSJ8zPg5oVH2DWVlnekTgOdO7k svZw== 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=k1yGawMdPH0Fv9fDhuR+pFBsijS1BFsUiHagW2u6++o=; b=wsk1Mj36hK/5vVUZiEiBY04dbKpHu9NrjSt5R7ZsMox1FX9nW5FmU8VGHt9Jx4Ed54 iocE7tALuru81kdMOhSDRfKDQPDdPtuyYv1MLxGNCkC6FCYGgvQxWMIDSWtibSb5l9rU GDCbP9lu5HEwIFWR5tGNSzLQ43BAr4cpc/j4iYpw7W90DhE0s/F9m3vt0Kdyr8NBJqIf Pa+NGvyaaFxTVAQYcdc+AZ2olXbe8FkZORNCX4RecdtZ16AfHxubxl4CTVqEmmr1VzyE DvniSgK2913Y0aRzLe0Hj9MNdQYJLk4Eqm5tGFbCk96FTdFItRRO6zpf4ar4dzVEh153 qA/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ReDWkHzn; 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 p2si3093949pls.31.2019.04.24.03.27.03; Wed, 24 Apr 2019 03:27:17 -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=ReDWkHzn; 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 S1729283AbfDXKVG (ORCPT + 99 others); Wed, 24 Apr 2019 06:21:06 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38377 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729365AbfDXKVC (ORCPT ); Wed, 24 Apr 2019 06:21:02 -0400 Received: by mail-pg1-f196.google.com with SMTP id j26so9163816pgl.5 for ; Wed, 24 Apr 2019 03:21:01 -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=k1yGawMdPH0Fv9fDhuR+pFBsijS1BFsUiHagW2u6++o=; b=ReDWkHznXz/zS6fEKN+2yRSUY4j5PtogzJY5oo0wr/7FvQJUR3mhSqYK2SyQ6SkUAa JHCMVDtejuopLROonSKm1aXUaLDWcyrYYYvXJ4UCT0hOh4pa9uI+e/onqaifKULfDZn9 BhGhmWmdrZDI/8weTEg2rdVPpo8mbFawFEQvWDALsy5VAWZJqtNwZ2fCczOWA3DqwGVK +/w7uGwUmQoqM/9qCUS8G23E9Fo4b0BfiBWnb2aZMoX7FsLJ9uedwqvTsrCAB27aYIyI xc5esJ5X8Wx+1E0qr5xnY9mZRYIANMfoEXpYQhoXv8Vs9SzvvzoNBcxnnbhxDC/RU252 NqNg== 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=k1yGawMdPH0Fv9fDhuR+pFBsijS1BFsUiHagW2u6++o=; b=RL3anxstQN48uJtSeTWilY0SqmazK6B0dKRbeF6lNWSCaENzayUjiiZfAOSfjvh8Ks aoaiV/PLQ2tdhgcjuW0pdD7ScMrbJmdaycb4JtK4WzwCyhsEs1NX7OLrC4uBlqxabwLr blAIcWyM3Vw/LyPrWEX/59Q3Y7UO2gsHpzJLBc+nmykPcoLQVPmblHFfo5ohCpeWyNzz hUPobQKgukJiVsQBSw/apz563aMxK/dZvvVrt7tgUXl2o3NtjPr2Il2UOTiXhmyzv5Ua asCkJMPBAZ0mlEdzpFf5UZadj/E/+nUb+u8LJTUZpRAQM1C6VM04JiiHcVUcOcRUPgkt io7Q== X-Gm-Message-State: APjAAAV55idT7LNyAt32L34PRrd0Vbfqr64w4HlcovnkyobIoOXICTn4 GtKHIQnSePmqpIqX63d5tHI= X-Received: by 2002:a63:b0b:: with SMTP id 11mr30357428pgl.445.1556101261637; Wed, 24 Apr 2019 03:21:01 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id v19sm25051604pfn.62.2019.04.24.03.20.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 03:21:01 -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 11/28] locking/lockdep: Update comment Date: Wed, 24 Apr 2019 18:19:17 +0800 Message-Id: <20190424101934.51535-12-duyuyang@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190424101934.51535-1-duyuyang@gmail.com> References: <20190424101934.51535-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 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 ec4043b..0543872 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2700,10 +2700,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