Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp593314ybl; Tue, 7 Jan 2020 11:31:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxlX+Cvhy7y8X2zc/opUlCovLRJEfREyZAaNniwCeGs+Fti8tHtwMf4S4YkSZnBzdd/bucN X-Received: by 2002:aca:ea46:: with SMTP id i67mr788219oih.149.1578425517455; Tue, 07 Jan 2020 11:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578425517; cv=none; d=google.com; s=arc-20160816; b=o27e1+95MgNuitnaImt2Gy7XRrug5pfqKCS3XnxvikyUQmF9yC138x4jW3Rr3Em/pq Z9ZEuU6SyOpBNTV3lVthSUhBdnYrbOa+5/DQy50V81zPYyNjpPCaeR7J9yK2BTRWs5K0 CEL3XNsMoFefhl3qoUJp2oRc9eB/5lPOEtZptHe82VNpddgoox1JukajPNTt7Ijwz059 +Yb5muywaay6buR3sPNvait7QpE3n6Q3FUfeAkx7gP86Bf760j6Dr6alpXsohI/O7ql4 kjeDyu4TmUoOr7illsZqjVScE4Q1Nkx6kVs76D20vJmgeE8ewXzMJI+AHVRNcUSjW4dm Zjdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=ydzbsY0i6MRr67P6Q3t/fs+mF8B+uFgZNEmwYDqmlq4=; b=ck6Se7viPXegxAFq28atKZo4qxYF6EmnRypGsorky55S1XeHmopLsGCmdEafrqEyU6 Fcznixib9zeVH8Frop2+LSXbapZWwROcKzHzulf7V9/UxkNJKUtmHiG0nzpXZ955vKE2 YnqhfIAslwViW0BhfWt7sW3MqCCTaNKuQHZ6J6DKaCk3topIrN84C7lGgz17Q/8gTW6y ywcYVrJdNVhjEqdQix25sEorbRac77YFAGnUBIoz7GHu+qG491i7VeCRBhoigkqgq+7z 9nmyBNSM1ngpqh/u4KeYDqX19uv06+CE8UvzjsLpyT8RApIRupLJmwdI5ihg53qI5+TS M4CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=reG5fXVi; 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 5si488412oil.188.2020.01.07.11.31.45; Tue, 07 Jan 2020 11:31:57 -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=@gmail.com header.s=20161025 header.b=reG5fXVi; 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 S1728794AbgAGTax (ORCPT + 99 others); Tue, 7 Jan 2020 14:30:53 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:51318 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728307AbgAGTaw (ORCPT ); Tue, 7 Jan 2020 14:30:52 -0500 Received: by mail-pj1-f67.google.com with SMTP id j11so6449pjs.1; Tue, 07 Jan 2020 11:30:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ydzbsY0i6MRr67P6Q3t/fs+mF8B+uFgZNEmwYDqmlq4=; b=reG5fXVibdr1/s8/SEGRIYgTyVBxOrtDm7KwQso8puDhJZxksCbfim8QllpxbDifoQ mS3J0KTvMA6FXU4JkXC8Pysm+hTpffxlUDJgxr+ftSOjddhSdlLVP8IHRctJN5TpHJgF QDMhdwBxf8ghJ/wiA/r/okq4FOGA3eeT0GS9ddHnDva/+js7icy2YYSbidm70QuFZExR Tgs9j9vXOGz0Rqwd1fwr0l9Kc6Qazv4qoxowPYg4ob0QYkQ2iVBnq7ZU4Q7BNR61m5eC v9+kyXWuSjA8jZuAJqmT4AFBQdajI68kaPZQv7cFNLjTcJV9zLDBVDo5AQajmeBjsDRn eI6Q== 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; bh=ydzbsY0i6MRr67P6Q3t/fs+mF8B+uFgZNEmwYDqmlq4=; b=Q1Mm6Eec6k3r9iqFezqJ8asJj4iTH0w89KpQPohGKBeA59nibXDU3IXGFpCTqtG/IJ XRSPmZ5A344tsGHTb2mWMhe8665jJzIwK8wsgjEoqml4g3cvUJyFQAytqFjXNq7s0FsL EOh53yvYYRCuY+6mZmgumqVjUYRDR5KOazLvFz2APLXfhSWF7jqOYoYogFuEDA2P7+/j hboz+CA3b7YM+4bSb0q7eLJYChRjjhjyAxJg1QJtcRgIBrXCOCmWASU2sUpcxs6AqC+w v7lqfBFjrDSm4UxDLL2GKqrjVdxM/qU22Z+5fxG+s+cHBWYso1SZ4sPvMVUFINap/7eO Jv/A== X-Gm-Message-State: APjAAAWdPWHahM0B/ffT8EfSEDk3F+3j6lcEWRSut+9cx3zK4MBgGgCi +9cqM0am1uSibL41Zm3DMvg= X-Received: by 2002:a17:902:c509:: with SMTP id o9mr1305510plx.112.1578425451687; Tue, 07 Jan 2020 11:30:51 -0800 (PST) Received: from madhuparna-HP-Notebook.nitk.ac.in ([2402:3a80:1ee3:fd53:8500:6ea8:4ef2:c9be]) by smtp.gmail.com with ESMTPSA id j9sm357775pff.6.2020.01.07.11.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 11:30:51 -0800 (PST) From: madhuparnabhowmik04@gmail.com To: dennis.dalessandro@intel.com, mike.marciniszyn@intel.com, dledford@redhat.com, paulmck@kernel.org Cc: rcu@vger.kernel.org, joel@joelfernandes.org, frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Madhuparna Bhowmik Subject: [PATCH 2/3] infiniband: hw: qib: qib_verbs: Use built-in RCU list checking Date: Wed, 8 Jan 2020 01:00:39 +0530 Message-Id: <20200107193039.22836-1-madhuparnabhowmik04@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Madhuparna Bhowmik Use built-in RCU and lock checking for list_for_each_entry_rcu by passing cond argument to it. Signed-off-by: Madhuparna Bhowmik --- drivers/infiniband/hw/qib/qib_verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index 33778d451b82..845ba888734e 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c @@ -329,7 +329,8 @@ void qib_ib_rcv(struct qib_ctxtdata *rcd, void *rhdr, void *data, u32 tlen) if (mcast == NULL) goto drop; this_cpu_inc(ibp->pmastats->n_multicast_rcv); - list_for_each_entry_rcu(p, &mcast->qp_list, list) + list_for_each_entry_rcu(p, &mcast->qp_list, list, + lock_is_held(&(ibp->rvp.lock).dep_map)) qib_qp_rcv(rcd, hdr, 1, data, tlen, p->qp); /* * Notify rvt_multicast_detach() if it is waiting for us -- 2.17.1