Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1992499ybv; Fri, 14 Feb 2020 09:26:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxj5DlEhlkxAjFOxWCMtyie8SXPBXmY9qcetPLo3QVU/M8E9/av2JGoGd5eEUTsEifaCsk9 X-Received: by 2002:a05:6830:1198:: with SMTP id u24mr3079925otq.215.1581701182438; Fri, 14 Feb 2020 09:26:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581701182; cv=none; d=google.com; s=arc-20160816; b=aJfTgSaFqF2nioTjgoja3hC/7PKL4aRXtx2FSEESSlTyGwGC1u1L8RAS99TGLRGp/h snGEQ/sIwk8c+K1BZ84eMdaRqQQUPQ+MJ6SPoDATbVwQrpVV4wS0dW1+pDy3AYkFQvXH twMimhC+uGCSrw1lhT94IgQRgdbuAGHFPBHGGuCpcGuAmaNAY+u55BaYAOMRIO1QP/95 8tCD3kV8+BLpXTGkir2jz9fSyoXHle8q9y3xuBhyxwpBxx6KOnPcdHwUGHP6nY4eVr5m stmV2c31qE7g886TrFl8quBJrSCpth6Uf59rEHhc+gd16R3A8qloxbfwbts0SY6v2d4/ EOeg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=toYWtGM8YHPJ3w7ZlSn88j0eTtK38uqoCkDoGgVz0Rc=; b=yJ6IAlnecY+4xh2AWjeVNbBGgrpYy34zU1TViF9OI3w2E0ePExlI8XncsFCOFnJhOi XDDMavgYPqvloVjd1n1iDA2YgVBYlnLhwOqOSVXQ22+4ZkwW7vqCsDiSBoahmuI/vi1P bp5EGbpsdwSrY0vm/7OldxAwXgerrdBZmYGQXvuPHm/pEQNjVpUi303d1GuZosyKU21L TeiaRnl2MkHN1aBW8H/8J+H90Y5a0RYST472HewlMILodqDdDDkzVEzBzvkM10+GYD8E JpIGlS5fSv7GrTjFNpo7l0A8QzVoQ1+sjPQhDOCqVFGMI5NuwSCGgMgRx6pyPy8IwVN8 x+vg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si3194454otn.323.2020.02.14.09.26.10; Fri, 14 Feb 2020 09:26:22 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391512AbgBNRZA (ORCPT + 99 others); Fri, 14 Feb 2020 12:25:00 -0500 Received: from mga17.intel.com ([192.55.52.151]:43172 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390928AbgBNRY7 (ORCPT ); Fri, 14 Feb 2020 12:24:59 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 09:24:56 -0800 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="223081205" Received: from ddalessa-mobl.amr.corp.intel.com (HELO [10.254.204.146]) ([10.254.204.146]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Feb 2020 09:24:54 -0800 Subject: Re: [PATCH 1/3] infiniband: hw: hfi1: verbs.c: Use built-in RCU list checking To: Madhuparna Bhowmik , Jason Gunthorpe Cc: mike.marciniszyn@intel.com, "Paul E. McKenney" , Joel Fernandes , Amol Grover , linux-kernel-mentees@lists.linuxfoundation.org, rcu@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org 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> From: Dennis Dalessandro Message-ID: Date: Fri, 14 Feb 2020 12:24:52 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/14/2020 10:43 AM, Madhuparna Bhowmik wrote: > > > On Wed, Jan 15, 2020 at 12:05 AM > 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. > > Hi, > I just wanted to follow up on this. > Any updates? > Also, is the bug fixed now? > > Thank you, > Madhuparna > > Thank you, > Madhuparna > > -Denny > I've got a patch going through internal discussion and testing for adding rcu read locking. The RDMAVT patch, I was OK with going in, I guess I just mentioned that in a reply rather than adding an RB tag. Let me go ahead and do that. -Denny