Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp430681img; Thu, 21 Mar 2019 01:00:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9SAsUQer0WywcjV8JBMjDsBtZZQRXLoUFFJpJcLUaWQ1h+iAptoLzPTBKgmkHcNz+6KfJ X-Received: by 2002:a63:5310:: with SMTP id h16mr2156183pgb.196.1553155207092; Thu, 21 Mar 2019 01:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553155207; cv=none; d=google.com; s=arc-20160816; b=ZFDhmf+OC6YDu+HtP0nojERK/eTOrf2D/joiDfvW+xzXYbHgWllz7dYaIXoobwH2NC aRJMTK/HuhnSaKrxYbgxMDjO4DFR7NkAk8qJmsc/8vC7FfhU6rqDYvsaq4eYqtSU3ohi y4VSYpgrMty+cqUPQLawbKlmLM8ghKdmFft/uHzum2USpDs884xMdp3jPhrvVtW76us6 b5BBtSlXuzjA1b0/0T/2Rg6Fd7hQnckSZQkCwsOU5JmrgXkj1gS5NaPVuEVh/mpcCUhB x9XgSnOS6QT2R6RmXHYS//KelUFiA6lwGg6pAJh9S8nSe8ua/MGotpegr2ku7E7EajyD aB+g== 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=Jie9sXrP5TbUt+dDutJxDwvf3sW4lsgNQ0u1ti/esj0=; b=kICGkdZHGE3tFmMkyPwuvRsCn2+5wu1VfGpxG41b3cnk+FuRy6k8fofuGHhrVUATtM ka5RGL8uti/LHHzjzRueILtLnuwymKhUE3ylrYvYAOxmVMfvRNihEJoTKw8M3c7nw5yj 2t3O3gurB2UjK4Q1hauDFZSadcxC/zAM/dQQAo7G6emM4hNwi62jL0GGVlUtMba4L3kh KiuEDcJ9PmwSGF7oPNo2RDXHWkD3pAs9oSxdRwIPWBcidHn1cF7caO75H3Vjonq0j8Gl B0EhNLWblIiRrK4gQhYLDNiQvnj1wD2B2HGvvItiKQdYgn0h/IOCGZFOIwhPxJdbJ8D3 ynug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oWhjDMNo; 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 d41si4053730pla.307.2019.03.21.00.59.52; Thu, 21 Mar 2019 01:00: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=oWhjDMNo; 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 S1728059AbfCUH6J (ORCPT + 99 others); Thu, 21 Mar 2019 03:58:09 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35751 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbfCUH6G (ORCPT ); Thu, 21 Mar 2019 03:58:06 -0400 Received: by mail-pg1-f194.google.com with SMTP id g8so3694327pgf.2 for ; Thu, 21 Mar 2019 00:58:06 -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=Jie9sXrP5TbUt+dDutJxDwvf3sW4lsgNQ0u1ti/esj0=; b=oWhjDMNo4F0mSG81rzacO8SUY9SarkFynMmVcxWzc87/3Php8UzGm1Hwl6SHBADbjw TbsZmGOihlXoxwj6U6sSOmrTsYb4YpbQZViNWzxm+JGZVnVlI87cyGP0g8vJyzwLJB3V 6BbxmQXaGUMo9gJbumZQcmMvxyzM7tpxrUSjIrB8SnPP/pIvOhR43WsgcfPB5CR0nwAt gTzBFXzKC/qbTHtwaZoH8i/xUkMbJMwGrT0/J1svs9VCQmAqnKBqKjkbQkSRm781HKV1 7b3seHFqmt0pAYNugsM1gCxudHlfiPHhE7VhIIQ4QX0OZ/3INcSDSH19//PDIvNVTWLC XC7A== 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=Jie9sXrP5TbUt+dDutJxDwvf3sW4lsgNQ0u1ti/esj0=; b=BpHp44IbMW854Ho0Nv83BKvKaPQSmWMeC25C8G1V5QQ0RF6oSIYRDlW0UlhNGNcB10 tooQ9f7btgESQBcLT9nSo6egm80VMVod/xw3y4/Xy0BOOK4oeiNv8GZFCPvlNrg9QJRl CRhOmR6yWH+SkWmbqJ31Bki7luVFaT2b/F+fcwhEhHUJ9FQRD28IepyjHdM933gqUP7y E1WFSvHP56OdbXcI6oHFnrhMT5CD+UlNNFx0SEPd/Rpgg87IadycjTnArdGDn/6FJzxr UJqcnTyDH2eqfu0MZgQTK44MPIefiSeiFhjiHHa40I/tacdDZxqkzmm5SGEbGW4vJVLM D10A== X-Gm-Message-State: APjAAAWbPxMZMZylGLK9XhY4+uBKH6fx3/U86gVw+8N+c1wAD43cII51 5Fcz9D2vJ6aFexk1vkMflso= X-Received: by 2002:a17:902:8609:: with SMTP id f9mr2192539plo.85.1553155086356; Thu, 21 Mar 2019 00:58:06 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id e184sm6467148pfc.143.2019.03.21.00.58.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 00:58:05 -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, joe@perches.com, Yuyang Du Subject: [PATCH v3 11/18] locking/lockdep: Update comment Date: Thu, 21 Mar 2019 15:57:18 +0800 Message-Id: <20190321075725.14054-12-duyuyang@gmail.com> X-Mailer: git-send-email 2.17.2 (Apple Git-113) In-Reply-To: <20190321075725.14054-1-duyuyang@gmail.com> References: <20190321075725.14054-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 c7aec9f..eccfb0b 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2720,10 +2720,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