Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5922979pxb; Mon, 14 Feb 2022 10:46:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJylBS2Y+kixhwFDe+4DlQLSJdP6OsRLXI3n/+sz5TzSDL7wRm12so2reiXexZSItp21p3zn X-Received: by 2002:a17:902:b941:: with SMTP id h1mr336788pls.73.1644864417290; Mon, 14 Feb 2022 10:46:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644864417; cv=none; d=google.com; s=arc-20160816; b=QeEdikJPjQtBUurqA4MIQNwhKEaS9eNxs62RlLtbZjDYjo3a1DenJUa50eP9bkvD/K Po/8Pjjk2Gm0m1/4+oHpDRxfTht8A5PZMAu3xrHEYakHVJtHnnlTa8QyrgnKTZqd/jDc vBl4PK4evcaBvqpjV07NPO3NB7wFLcP8snIO9FiG6iY9bUTe00tYsuurK/TExd2tcf5H /E0tjarVSYbWEsbAEyyutviVqdkL6FJox+IaP7kYdW1jjb4jOw2lAk8WjzYizgPC4QRR 92sWHdjTqyIAXHlntURQd10g/4uNkUB1Myfdoy1tbjE4K5E7+3O5sZn6sP18bFs43mk6 +SwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lRMqA8aWkMK6f3JSdfvjxBfIJRu2vtNiRCA6/pEDPJ4=; b=Bx+fW6VVrTIdps73fgg73AV2G0w2/7MQJYERmcC0K/DzJhf9+qGxNpn521U4iPscXT SVB5y/nQ2n9QrViVB+JBVvq0u3cWALDWx6ZtMfJ47isCzopFunJADnFhfBmVwCgB0atM 6aUcfjd+QGULlncYzqfx5JZQu+OYKrhMqkhixbDVHyf0agLa+6/NAQ9mjetfhpzoQraW NYa9SpT5tBwvr5W1QscDQ6QDEl4bRMdv1KKijab8zE5MVgfepBuyUP831vTsF2pR02r+ Zi/q2Y9RmTAHwKW0gP4pOsvfFg6JwIu8X/BcW8DxLylTu4JCg8kP9azfBmSMaAGMPIoX IQtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VFponCiB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mn20si11623233pjb.51.2022.02.14.10.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 10:46:57 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VFponCiB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76B2170F54; Mon, 14 Feb 2022 10:46:47 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343879AbiBNJvZ (ORCPT + 99 others); Mon, 14 Feb 2022 04:51:25 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244895AbiBNJrJ (ORCPT ); Mon, 14 Feb 2022 04:47:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39DDCBC89; Mon, 14 Feb 2022 01:40:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 36939B80DC4; Mon, 14 Feb 2022 09:40:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAC66C340E9; Mon, 14 Feb 2022 09:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831619; bh=9UIpJ7Qr40wlvc0HkfKJnCStF6n4rMmoiv/CVWW4p4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VFponCiBbfdzM05yI1e6BPWUQCCZOPz4uHdFrQwu7CA0ieUugDovRB9Rb+9P3R/X8 hPf1aIyCStwVFeMis48E6lya9D7XNI9Ys4n+5yRnvBDB/Jkfb8/IzLGB+yF/m2rWs0 vwrGUZiqn3V7m3S7IzOdqp8Ns3+AKueUaMJuux38= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Anna Schumaker Subject: [PATCH 5.10 009/116] NFS: Fix initialisation of nfs_client cl_flags field Date: Mon, 14 Feb 2022 10:25:08 +0100 Message-Id: <20220214092459.004095430@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-kernel@vger.kernel.org From: Trond Myklebust commit 468d126dab45718feeb728319be20bd869a5eaa7 upstream. For some long forgotten reason, the nfs_client cl_flags field is initialised in nfs_get_client() instead of being initialised at allocation time. This quirk was harmless until we moved the call to nfs_create_rpc_client(). Fixes: dd99e9f98fbf ("NFSv4: Initialise connection to the server in nfs4_alloc_client()") Cc: stable@vger.kernel.org # 4.8.x Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Greg Kroah-Hartman --- fs/nfs/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -177,6 +177,7 @@ struct nfs_client *nfs_alloc_client(cons INIT_LIST_HEAD(&clp->cl_superblocks); clp->cl_rpcclient = ERR_PTR(-EINVAL); + clp->cl_flags = cl_init->init_flags; clp->cl_proto = cl_init->proto; clp->cl_nconnect = cl_init->nconnect; clp->cl_net = get_net(cl_init->net); @@ -426,7 +427,6 @@ struct nfs_client *nfs_get_client(const list_add_tail(&new->cl_share_link, &nn->nfs_client_list); spin_unlock(&nn->nfs_client_lock); - new->cl_flags = cl_init->init_flags; return rpc_ops->init_client(new, cl_init); }