Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2102487pxb; Fri, 25 Mar 2022 11:07:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf37FDkM2XtR7wr7nBnr+qUPNkJOEuroT6HDvUaHZrLi2sOZgoNXT/rbrKEyd8py/727oc X-Received: by 2002:a17:90b:4ad1:b0:1c7:442c:9ecf with SMTP id mh17-20020a17090b4ad100b001c7442c9ecfmr25916095pjb.240.1648231648664; Fri, 25 Mar 2022 11:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648231648; cv=none; d=google.com; s=arc-20160816; b=XeDaiYU6i/BaOXiAtrXlA2FgLE35bZzsLpnr0VOg/sIFFm+ft4XbZoOgvAslig3ZGF qnGfvt3eIjL3oQ2cKkJSiwAideXIrivTuUrWlWECCkiR96pSSEJvJUb6BQFhwCKT2qxr 1pcl0LoBOQa2i00iYphgriqtUPdhF67uPMlo/iMtU1zgRQ0vi/ete91KAkiWlYLyjWPd lyPabxJG1EM25JUbtuLx0AbPb7jAPbyXK9EF9HJuKo+PTtltKM9xV69AyXzxBs8aUNKH K3iNBng4l5Mi2vDT8zpvixMoHz9237VW2qIJUIamlzLPYlRU1pOr21C2ePitrmP8KKOJ nKGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=GxpivvuiDhi8Meku7aRkDAE9Hjn1RoD/lKyyatBC6fo=; b=PEz0kTi/zeUDkzWAVgItHan9IDd+k47rQFn/EmlckaItlmxxNeR0BA4Krj7Y5wp4J5 nmDW+HXyzi3MGdfLTIqWagzdFOgNVwCyGorF6+MWWcg3iTSneW91o+1igd/7JvtuD4tk mPSpFPE2YsxEBjnO5K9HVUVPLG2NJou/OzoN6nq61Q8uSXZPf35QQDf8T+rOtjd05r4y cwqDulALwTmjkQIwOnw2AX/ooYw3LrW+Yp/Kd/aUNK1U5ORIl6I3AZZDNAshJzKGRzsS 8h5KJTZ4p7dY+URK4AoWRKaiUZ/r5MIDIZCt54aH5YXBnpZ+6YD0i2VPkX0PWQBzDQFg cHrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="obmw/632"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/uVC+exd"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o13-20020a056a001bcd00b004fa9846a3b7si2607242pfw.363.2022.03.25.11.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="obmw/632"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/uVC+exd"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 348821403EA; Fri, 25 Mar 2022 10:41:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357697AbiCYCL6 (ORCPT + 99 others); Thu, 24 Mar 2022 22:11:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357699AbiCYCLt (ORCPT ); Thu, 24 Mar 2022 22:11:49 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4746A6E2E; Thu, 24 Mar 2022 19:06:42 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 65D7C1F38D; Fri, 25 Mar 2022 02:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1648174001; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GxpivvuiDhi8Meku7aRkDAE9Hjn1RoD/lKyyatBC6fo=; b=obmw/6322qvngpDQFN0rPsPxkFnxb6G3GDPd4Y8stBKBgAnLRzPUnssKBaaeaaY4YN0Ld8 /GLE9kV0GtPKOFbh1JcPGubkXmAICloR3EeJYoceHsJOgI6qyed/tbN/ptkOXLSYjYNH7d 7B3YUWMfgA4Xumllu+hptCqjdkUsElQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1648174001; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GxpivvuiDhi8Meku7aRkDAE9Hjn1RoD/lKyyatBC6fo=; b=/uVC+exdBq+HN9CHeK1b2SpQB4QDXI0xJIp3USC1RfxXWuVF12YSe9zIbsTpqI/3Hu1AFT gmNzW5XJJ0T0N5Aw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 38432132E9; Fri, 25 Mar 2022 02:06:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OB6sOK0jPWJ6eAAAMHmgww (envelope-from ); Fri, 25 Mar 2022 02:06:37 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "NeilBrown" To: "Haowen Bai" Cc: trond.myklebust@hammerspace.com, anna@kernel.org, chuck.lever@oracle.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Haowen Bai" Subject: Re: [PATCH] SUNRPC: Increase size of servername string In-reply-to: <1648103566-15528-1-git-send-email-baihaowen@meizu.com> References: <1648103566-15528-1-git-send-email-baihaowen@meizu.com> Date: Fri, 25 Mar 2022 13:06:34 +1100 Message-id: <164817399413.6096.7103093569920914714@noble.neil.brown.name> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-nfs@vger.kernel.org On Thu, 24 Mar 2022, Haowen Bai wrote: > This patch will fix the warning from smatch: >=20 > net/sunrpc/clnt.c:562 rpc_create() error: snprintf() chops off > the last chars of 'sun->sun_path': 108 vs 48 >=20 > Signed-off-by: Haowen Bai > --- > net/sunrpc/clnt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c > index c83fe61..6e0209e 100644 > --- a/net/sunrpc/clnt.c > +++ b/net/sunrpc/clnt.c > @@ -526,7 +526,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *arg= s) > .servername =3D args->servername, > .bc_xprt =3D args->bc_xprt, > }; > - char servername[48]; > + char servername[108]; It would be much nicer to use UNIX_PATH_MAX NeilBrown > struct rpc_clnt *clnt; > int i; > =20 > --=20 > 2.7.4 >=20 >=20