On Tue, Apr 09, 2024 at 07:24:17PM +0200, Rik Theys wrote: > Hi, > > On 4/5/24 20:07, Chuck Lever wrote: > > On Fri, Apr 05, 2024 at 01:56:18PM -0400, Jeff Layton wrote: > > > Currently the CB_RECALL_ANY job takes a cl_rpc_users reference to the > > > client. While a callback job is technically an RPC that counter is > > > really more for client-driven RPCs, and this has the effect of > > > preventing the client from being unhashed until the callback completes. > > > > > > If nfsd decides to send a CB_RECALL_ANY just as the client reboots, we > > > can end up in a situation where the callback can't complete on the (now > > > dead) callback channel, but the new client can't connect because the old > > > client can't be unhashed. This usually manifests as a NFS4ERR_DELAY > > > return on the CREATE_SESSION operation. > > > > > > The job is only holding a reference to the client so it can clear a flag > > > in the after the RPC completes. Fix this by having CB_RECALL_ANY instead > > > hold a reference to the cl_nfsdfs.cl_ref. Typically we only take that > > > sort of reference when dealing with the nfsdfs info files, but it should > > > work appropriately here to ensure that the nfs4_client doesn't > > > disappear. > > > > > > Fixes: 44df6f439a17 ("NFSD: add delegation reaper to react to low memory condition") > > > Reported-by: Vladimir Benes<vbenes@xxxxxxxxxx> > > > Signed-off-by: Jeff Layton<jlayton@xxxxxxxxxx> > > Applied to nfsd-fixes while waiting for review and testing. Thanks! > > > Can this fix also be included in the 6.1.x LTS kernel? Given that "NFSD: add > delegation reaper to react to low memory condition" was added to 6.1.81, it > would be nice to have this fix in the 6.1 series. > > This way it will also be picked up by Debian at some point (it seems they > are upgrading to 6.1.82 for their next stable point release). Thanks to the Fixes: tag in the commit's description, it will probably appear in a later release of linux-6.1.y automatically. If we don't see it the next few weeks, I will ping the stable maintainers. -- Chuck Lever