Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5407267ybl; Tue, 14 Jan 2020 08:25:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxmGa6RZs7WGO8ILQIScqA4JJC73l+EQw2lDW4NIvCf6QWCQ+xqeUbahSrqD3xvT33MCbQ6 X-Received: by 2002:aca:c786:: with SMTP id x128mr16593058oif.2.1579019149998; Tue, 14 Jan 2020 08:25:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579019149; cv=none; d=google.com; s=arc-20160816; b=v+qxhQFqGbQ2bx47xD0PGsXHorLWDNeF+un2i8mNBopgHnCkDmmeyKullCCb2rTh4P NtB2SQUTSo6EGeImLX9gIZSSc/Gzzp/mV9v1DH1dRXk450vZhsiDgZuidqv1A44SYRwp uSWSiQsb6/1dhlLPUqcze4RwRRT73VzxlfgYpXr8lT/3mlKkjq5sqKRYTsAZST4ETWjH 89YTX2KdthcZ9Z55S1h16B/alNelFHdaJ7Il4Q6b1+9/XjAFF1x+sPW2cea1JmaaRRiy ktevgUcORNq7pvzCQCmHClwOfx823/3/F+c5Mk1aPq1ropY8qCvNmdQOUKrpfirZgZXV Pzvw== 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=PDyuI6D5hJtH0+thVw4r/qR9DD4Csl28GlClVXYvOmo=; b=ftlyfamLZVcNW0ZVyqm/bDtQzw33Vm55LGo/IGJ/HXaY12u3a2hQzGtQTMmfEgLHnh dLXoGA/SURhpkW+TqNc/YF0fzJV+73Qc0jd27fMA1TJVxDKqBEuKtaRjLL9Q2uwBrlPD rpWd9gpvtoMFaz8FtFGT3jzIGEy7SE7UFpk4EbtzDyg3zf/yuxPXBDlJ71BKzHua0bfY lz3s1VbwQyPSIy4bKAkVA064bqsKAwks/NS6X8KflVhTm654yVoEITi87KDmPgyLKl3f lTudCr2nDS5Ec43D5Z09eTQPwulw6eQoO6Ca3CUrc2hNYg5nNqO49w5lIqSz59MioQYt pRBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V2E6iTOF; 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 b17si8261243otl.320.2020.01.14.08.25.39; Tue, 14 Jan 2020 08:25:49 -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=V2E6iTOF; 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 S1728779AbgANQY2 (ORCPT + 99 others); Tue, 14 Jan 2020 11:24:28 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36373 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgANQY2 (ORCPT ); Tue, 14 Jan 2020 11:24:28 -0500 Received: by mail-pf1-f194.google.com with SMTP id x184so6828113pfb.3; Tue, 14 Jan 2020 08:24:27 -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=PDyuI6D5hJtH0+thVw4r/qR9DD4Csl28GlClVXYvOmo=; b=V2E6iTOF2PVQVslEQICUxmidoKU9xM7zyf01P1l8489cYNbLJV+ZZQtrMLKoe+T8eg +RvB47tw077vmFFz1SAkZawppGOeh5OaoMD9v2r5r1y94MTQOQ6ddLw8/VsovLd9ksgB NRfbzmyWdVy3/z1cel1683RKLbEehtnBUjZFDT9EgMVCocxLnMwj/o8KvPBRJEnJFrTE JkPCEEOTnwhprwu9BJGSmZVnaIEEWLsJ7amXbOu8f9YNbGqjmxFz/NVL57hroXB+ioMA 3NljDF2X1l1v6dnYyjtA60qgRV+7ya0pidazHJ7gkZ7fLKb0XTCN8wyGHq696y0+STxM qqng== 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=PDyuI6D5hJtH0+thVw4r/qR9DD4Csl28GlClVXYvOmo=; b=U2rl4GuV9yk1zWnlb5QpZ+DPzKQo2AC9iRZ8kP4LG/i/u2zrb+oG31fFVoqrR5gouH o6lzB0pKFH+6cLm7rqKluX6Z1m58jsnLVa8zyQlrXTGbhrQXdMxoEWYxDgxERTPT2DFi mVzMrplsKKcd2bDe20mzvgMhDNDJ0650fke0pugNDQtodenu7aOQHCStwyE9jRaesiem 3W9m4bEt5gMXYVyp9ksNbvZaFhf/HTAFbas7eYW0ntYyj2I/rygLIxfwcI3QOp1rxZ1z fdF2TvtW9Z0ejRQzFdc5DwJxGQr5NmzgiLnqVZufQx3c93UFogEZ4QBh+ZSrAfcY/goJ EavA== X-Gm-Message-State: APjAAAVuljGlpVuAFnTlJY7ZHvyxkpkKguxmzuydeYN0XtOBRSEFP9xD uTNnOGKhpGulhYW1NtKL/sY= X-Received: by 2002:a65:56c6:: with SMTP id w6mr28444928pgs.167.1579019067136; Tue, 14 Jan 2020 08:24:27 -0800 (PST) Received: from madhuparna-HP-Notebook.nitk.ac.in ([2402:3a80:1ee7:f789:438:77e9:83ea:bb95]) by smtp.gmail.com with ESMTPSA id s20sm17511918pjn.2.2020.01.14.08.24.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2020 08:24:26 -0800 (PST) From: madhuparnabhowmik04@gmail.com To: mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, jgg@ziepe.ca, paulmck@kernel.org Cc: joel@joelfernandes.org, frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, rcu@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Madhuparna Bhowmik Subject: [PATCH 1/3] infiniband: hw: hfi1: verbs.c: Use built-in RCU list checking Date: Tue, 14 Jan 2020 21:53:45 +0530 Message-Id: <20200114162345.19995-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 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 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ 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))) { packet->qp = p->qp; if (hfi1_do_pkey_check(packet)) goto drop; -- 2.17.1