Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2593686rwo; Thu, 3 Aug 2023 11:42:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlG3OawEHLClY5QEumOcVJi9PbAU6kKZcdI2/xcUI43D2cJzsBEa7H/WEMSVlaqesTUSbES1 X-Received: by 2002:a2e:8455:0:b0:2b9:e93e:65e6 with SMTP id u21-20020a2e8455000000b002b9e93e65e6mr8104487ljh.35.1691088136801; Thu, 03 Aug 2023 11:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691088136; cv=none; d=google.com; s=arc-20160816; b=U6v9iN+1qYB6paaPZvDK/KsO3mcJOhMLUZoaF5kW3HLATVxfgqnUccUwdDegKaSUWw DJsmZRVdNpuRU/1/ZQAKQtBivfG1i0R4Q1/UkNhrIbkDMo1vKN8SgyeMyu8daKsEC+1K L9CsRvHWgP/94Gr0X8L73H82YC11Em5EcgCopTi+lzdoqu+J90qmH+FKEOq+7ve/nDvs Wz6hYepn4bJx646RB7HGChW7NpGDFKsJoRsKAki1EHlkCBfCyyr++KMIsAM1PJ3t0nnl ZLJ5IH2qifuQOMeMDg4axyT9B7BNJslEcCBLsCNeCE7m/nIPsK79vwvwgPa750AVjbiz jdGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hYxKLRI5CKIm+/IdaWmZ32uqGrkDm8N+HcHgKm76WY0=; fh=Hy2FJTcW6jS241wy3YFtpY6l9iOLxY7KM+SfYMAuaIc=; b=rBKTOi2ZF3+WEgE9lNno3cvI5MOewuHGVn7hX1/IH9n9+Aoff4EuaHI3tJAEsF4myy x+SBGAKp556Sv0nWstOGfhtrv+KAT/wsA1VzI5vKMA+tqFcnbJ1Tl3qGVm/wtg0amNTM TcKWVq5HXaDBnp/jJZhodpO6ZTLPgP7K9BA75f0mHseWIxmliQjtx+0cuHVqg7MCgUO6 I9hXMhLrwVeOpr+fAf4erTzps0sro3r3VxE0FgVezbDSYC1UdpIEVmlKJ5XN171uyNBQ OaJfdgu/yR+Rm3bJHPXKxG27v/KXo90JHyE+LxOBz1TNdfvqEGU6DOJabFl/bumGVtAo UWtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HIYMoE50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020a170906161400b00992d0de8766si252503ejd.913.2023.08.03.11.41.52; Thu, 03 Aug 2023 11:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HIYMoE50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234957AbjHCRnG (ORCPT + 99 others); Thu, 3 Aug 2023 13:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235232AbjHCRnF (ORCPT ); Thu, 3 Aug 2023 13:43:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6776A139; Thu, 3 Aug 2023 10:43:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0541161E57; Thu, 3 Aug 2023 17:43:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE62CC433C8; Thu, 3 Aug 2023 17:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691084583; bh=TXt73pdbEsVjNXx498XOQs5hPMVwlvDMtseT7OsCBTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HIYMoE504Ia2M5zkEN+fdiA4gv4woltf3Opl2nbyoWra7Aa/MTzEvymq3lg2Puedq yVW6V4wWznxVdhWnv+mtGNdRSbKyw1DONbXDh1j6BXWsfn2b300r/jAceMd9jbZmt0 NcMYtm5d7V/Xi1czCcdKMkLFRc5xJt5zReHDCZbzF6qcBKyFH31zHS9ob27EeR4KC4 pf7nHlUGKJNBi0jCOXsw6vDk2ftw7aMVv7zGAxKu5K0zJuaeA60802dmu5TKXMH5p5 NNf7aSNdsm8K8a1T7SOrAerdxArv27H/QbnSilSot86JWPSTcbJpcQwugTBdScjO9T 2QpkUgfWVBQnA== Date: Thu, 3 Aug 2023 19:42:58 +0200 From: Simon Horman To: Guangguan Wang Cc: wenjia@linux.ibm.com, jaka@linux.ibm.com, kgraul@linux.ibm.com, tonylu@linux.alibaba.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alibuda@linux.alibaba.com, guwen@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH net-next 1/6] net/smc: support smc release version negotiation in clc handshake Message-ID: References: <20230803132422.6280-1-guangguan.wang@linux.alibaba.com> <20230803132422.6280-2-guangguan.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230803132422.6280-2-guangguan.wang@linux.alibaba.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 03, 2023 at 09:24:17PM +0800, Guangguan Wang wrote: ... Hi Guangguan Wang, > @@ -1063,7 +1063,7 @@ static int smc_clc_send_confirm_accept(struct smc_sock *smc, > memcpy(clc_v2->r1.eid, eid, SMC_MAX_EID_LEN); > len = SMCR_CLC_ACCEPT_CONFIRM_LEN_V2; > if (first_contact) { > - smc_clc_fill_fce(&fce, &len); > + smc_clc_fill_fce(&fce, &len, ini->release_ver); Here ini is dereferenced... > fce.v2_direct = !link->lgr->uses_gateway; > memset(&gle, 0, sizeof(gle)); > if (ini && clc->hdr.type == SMC_CLC_CONFIRM) { ... but here it is assumed that ini may be NULL. This seems inconsistent. As flagged by Smatch. ... -- pw-bot: changes-requested