From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 190CDC433E0 for ; Wed, 10 Feb 2021 09:34:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D676F64E37 for ; Wed, 10 Feb 2021 09:34:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbhBJJeq (ORCPT ); Wed, 10 Feb 2021 04:34:46 -0500 Received: from gentwo.org ([3.19.106.255]:47804 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbhBJJcW (ORCPT ); Wed, 10 Feb 2021 04:32:22 -0500 Received: by gentwo.org (Postfix, from userid 1002) id 64A123F02E; Wed, 10 Feb 2021 09:31:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 614C63EA54; Wed, 10 Feb 2021 09:31:32 +0000 (UTC) Date: Wed, 10 Feb 2021 09:31:32 +0000 (UTC) From: Christoph Lameter X-X-Sender: cl@www.lameter.com To: Jason Gunthorpe cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: Re: [PATCH] Fix: Remove racy Subnet Manager sendonly join checks In-Reply-To: <20210209191517.GQ4247@nvidia.com> Message-ID: References: <20210209191517.GQ4247@nvidia.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Tue, 9 Feb 2021, Jason Gunthorpe wrote: > This one got spam filtered and didn't make it to the list: > > Received-SPF: SoftFail (hqemgatev14.nvidia.com: domain of > cl@linux.com is inclined to not designate 3.19.106.255 as > permitted sender) identity=mailfrom; client-ip=3.19.106.255; > receiver=hqemgatev14.nvidia.com; > envelope-from="cl@linux.com"; x-sender="cl@linux.com"; > x-conformance=spf_only; x-record-type="v=spf1" > > Also the extra From/Date/Subject ended up in the commit message Yes the Linux Foundation guys are not willing to address this issue in any way. I may have to give up my linux.com email address. > I fixed it all up, applied to for-next Thank you. > It looks like OPA will also suffer this race (opa_pr_query_possible), > maybe it is a little less likely since it will be driven by PR queries > not broadcast joins. > > But the same logic is likely true there, I'd be surprised if OPA > fabrics are not running a capable OPA SM at this point. There is also another potentially racy check in there for OPA in regards to the support of path records? static bool ib_sa_opa_pathrecord_support(struct ib_sa_client *client, struct ib_sa_device *sa_dev, u8 port_num) { struct ib_sa_port *port; unsigned long flags; bool ret = false; port = &sa_dev->port[port_num - sa_dev->start_port]; spin_lock_irqsave(&port->classport_lock, flags); if (!port->classport_info.valid) goto ret; if (port->classport_info.data.type == RDMA_CLASS_PORT_INFO_OPA) ret = opa_get_cpi_capmask2(&port->classport_info.data.opa) & OPA_CLASS_PORT_INFO_PR_SUPPORT; ret: spin_unlock_irqrestore(&port->classport_lock, flags); return ret; }