lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41489d55-4d40-4761-9a4e-88357c3866db@oracle.com>
Date: Thu, 9 Oct 2025 17:16:58 -0400
From: Anna Schumaker <anna.schumaker@...cle.com>
To: Joshua Watt <jpewhacker@...il.com>, linux-nfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc: Trond Myklebust <trondmy@...nel.org>, Anna Schumaker <anna@...nel.org>
Subject: Re: [PATCH] NFS: Fix state renewals missing after boot

Hi Joshua,

On 10/8/25 7:09 PM, Joshua Watt wrote:
> From: Joshua Watt <jpewhacker@...il.com>
> 
> Since the last renewal time was initialized to 0 and jiffies start
> counting at -5 minutes, any clients connected in the first 5 minutes
> after a reboot would have their renewal timer set to a very long
> interval. If the connection was idle, this would result in the client
> state timing out on the server and the next call to the server would
> return NFS4ERR_BADSESSION.
> 
> Fix this by initializing the last renewal time to the current jiffies
> instead of 0.
> 
> Signed-off-by: Joshua Watt <jpewhacker@...il.com>
> ---
>  fs/nfs/client.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 4e3dcc157a83..96cdfeb26a90 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -181,6 +181,7 @@ struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_init)
>  	clp->cl_nconnect = cl_init->nconnect;
>  	clp->cl_max_connect = cl_init->max_connect ? cl_init->max_connect : 1;
>  	clp->cl_net = get_net_track(cl_init->net, &clp->cl_ns_tracker, GFP_KERNEL);
> +	clp->cl_last_renewal = jiffies;

Thanks for the patch! It looks like cl_last_renewal only exists if CONFIG_NFS_V4=y, so this
will fail to compile with NFS v4 disabled. Can you please move this to nfs4_alloc_client()
in nfs4client.c?

Thanks,
Anna

>  
>  #if IS_ENABLED(CONFIG_NFS_LOCALIO)
>  	seqlock_init(&clp->cl_boot_lock);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ