Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5579886ybl; Tue, 14 Jan 2020 11:18:47 -0800 (PST) X-Google-Smtp-Source: APXvYqy3BOcCjcWKpV3mHbCQ1cj16uJe3xYgRgLZCbB7aNkBq+kzAwOzCTvmCpMokVmfCcxHILX7 X-Received: by 2002:a9d:7593:: with SMTP id s19mr17151738otk.219.1579029526681; Tue, 14 Jan 2020 11:18:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579029526; cv=none; d=google.com; s=arc-20160816; b=NFgQhTuSDNBaO4X8TMkU5CRIWDOHKylle3UFySFBbRJEn+Ueo+U92jcs+chKLborAW xNb2y8sGwUKNuos9Quan7lX9v8TrFRWnJrws6yHe23AL73WieDkGhk440CiTBe31k/un MRbY8yyPzm0tjBLYztY418XBSBwl+3T23zywJzcvXUbhnn2/AuJcuvinQvFQbLqUl/qG iPwcFGv6CTDd455dwM7REQE7RTd8MNyCNTzH2umuHXtrVGnO2Ax6w88gUAH1GN1AcAbJ j6BMWhoFDqW3675LgQH7u8/ATfC/KyTI8fq3xrNPZMBQK61FZ438Hb3077Q3tK5Z/7OH 92nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=KKog2MzKI2EmbmFRZbPQAj3SDffD3J1/gHWJI9GN8Ak=; b=uCFVRHt+3vmWnEkpS9ecBWDnj5jOLF/222U2HnbW5xQwrzuEbLVUmEb4JdSKIeBq5T jCHWHm9KmMpTQLHOFJcxR8ibjdxbm3WkaPT0AKmR00eeZJwdvMaR0MN3eTUyeG+/+WG+ hRzaVarGyn2lr5Wh9MRssea+fKj58FTRmY2lt+NPRLOM6FCzJVXQ9cpUyRtTRf/LUTJk 5TVim88dBMsKLIfepobGP6Mnge2FDGiPwjI9DQZWUAK1NBStPlkcW+fxFJel7pR8VVkY MhzPfC+TEuYnaIvrOGoMerTC203jObBUd1PTTyR1ef1iTmGsstgyanmwBWvs4TO3RLB+ s3+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=HX1p1M7M; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si9202179oti.47.2020.01.14.11.18.34; Tue, 14 Jan 2020 11:18:46 -0800 (PST) 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=@joelfernandes.org header.s=google header.b=HX1p1M7M; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728734AbgANTRg (ORCPT + 99 others); Tue, 14 Jan 2020 14:17:36 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:40543 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728721AbgANTRg (ORCPT ); Tue, 14 Jan 2020 14:17:36 -0500 Received: by mail-pj1-f67.google.com with SMTP id bg7so6298266pjb.5 for ; Tue, 14 Jan 2020 11:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=KKog2MzKI2EmbmFRZbPQAj3SDffD3J1/gHWJI9GN8Ak=; b=HX1p1M7M0qxTTrjPtfNCyMe/XxOTqf3q/mYb+Bs7xX2IsBGHIdUtLmO3lbUJnekqs3 zmZx8eaYvmH4+wfQapPvneyFUPr/+naxzGfN2z9odiTcSz9ffOPkHSr8fVCJMQIDdqjd 8+zg9cI3eFRQ+yHpgNKile2uqExmKwhkD4jRc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=KKog2MzKI2EmbmFRZbPQAj3SDffD3J1/gHWJI9GN8Ak=; b=Ss7u9BnuyFFngLj27Dv8x5kMd1C/v4tQYlx0xUwLnanPsWi1rO9yD/+CypSfRL6+iB JvOVLK0QYp7A0u9qj4OKtIaCqUlQLyCBPgXsh4T+ghAjY3l13AJEkTofjI1vesfXgaWP 6Os5WHkXrBnOACAoVgEGIixMzKYYEZy4eM260cKOf1e+K2GkDVj617dDWG59mzJVxPWP lGQ/T94Fh8pvuOWkgFlgUeBOomvVvUaFs5PDO+sczi1Zeks3dgbd63FIhjP/KcSsn8pw 3F1c6Z/jCXOeFJO7IL5GZ3S/aiX8cLDxtNxbodbzVYu9v6GDdTlmBrkgElYKtXsRE3oD W8zA== X-Gm-Message-State: APjAAAUDj+4nVqT6s1f442pG9Nt0I9EOW0IKT0K38DUl1F6hyEvCQk10 Lv1DP7nDILYSUYC/ejSumJ6aJA== X-Received: by 2002:a17:90a:8a98:: with SMTP id x24mr31844615pjn.113.1579029455327; Tue, 14 Jan 2020 11:17:35 -0800 (PST) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id b21sm20338404pfp.0.2020.01.14.11.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2020 11:17:34 -0800 (PST) Date: Tue, 14 Jan 2020 14:17:33 -0500 From: Joel Fernandes To: madhuparnabhowmik04@gmail.com Cc: dennis.dalessandro@intel.com, Jason Gunthorpe , mike.marciniszyn@intel.com, paulmck@kernel.org, frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, rcu@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] infiniband: hw: hfi1: verbs.c: Use built-in RCU list checking Message-ID: <20200114191733.GC103493@google.com> References: <20200114162345.19995-1-madhuparnabhowmik04@gmail.com> <20200114165740.GB22037@ziepe.ca> <74adec84-ec5b-ea1b-7adf-3f8608838259@intel.com> <25133367-6544-d0af-ae30-5178909748b1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <25133367-6544-d0af-ae30-5178909748b1@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 15, 2020 at 12:04:58AM +0530, madhuparnabhowmik04@gmail.com wrote: > From: Dennis Dalessandro > > On 1/14/2020 12:00 PM, Dennis Dalessandro wrote: > > On 1/14/2020 11:57 AM, Jason Gunthorpe wrote: > > > On Tue, Jan 14, 2020 at 09:53:45PM +0530, > > > madhuparnabhowmik04@gmail.com wrote: > > > > From: Madhuparna Bhowmik > > > > > > > > list_for_each_entry_rcu has built-in RCU and lock checking. > > > > Pass cond argument to list_for_each_entry_rcu. > > > > > > > > Signed-off-by: Madhuparna Bhowmik > > > > ? drivers/infiniband/hw/hfi1/verbs.c | 2 +- > > > > ? 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/infiniband/hw/hfi1/verbs.c > > > > b/drivers/infiniband/hw/hfi1/verbs.c > > > > index 089e201d7550..22f2d4fd2577 100644 > > > > +++ b/drivers/infiniband/hw/hfi1/verbs.c > > > > @@ -515,7 +515,7 @@ static inline void hfi1_handle_packet(struct > > > > hfi1_packet *packet, > > > > ???????????????????????? opa_get_lid(packet->dlid, 9B)); > > > > ????????? if (!mcast) > > > > ????????????? goto drop; > > > > -??????? list_for_each_entry_rcu(p, &mcast->qp_list, list) { > > > > +??????? list_for_each_entry_rcu(p, &mcast->qp_list, list, > > > > lockdep_is_held(&(ibp->rvp.lock))) { > > > > > > Okay, this looks reasonable > > > > > > Mike, Dennis, is this the right lock to test? > > > > > > > I'm looking at that right now actually, I don't think this is correct. > > Wanted to talk to Mike before I send a response though. > > > > -Denny > > That's definitely going to throw a ton of lock dep messages. It's not really > the right lock either. Instead what we probably need to do is what we do in > the non-multicast part of the code and take the rcu_read_lock(). > > I'd say hold off on this and we'll fix it right. Same goes for the qib one. > > Alright, thank you for reviewing. > > The rdmavt one though looks to be OK. I'll give it a test. Madhuparna, there seems to be an issue with your mail client where it is not quoting text correctly, either there is a '>' missing or there are too many. Can you look into it and figure what's wrong with it? thanks, - Joel > > Thank you, > Madhuparna > > -Denny