sst-linux/fs/nfsd
NeilBrown 137f672085 nfsd: fix delegation_blocked() to block correctly for at least 30 seconds
commit 45bb63ed20e02ae146336412889fe5450316a84f upstream.

The pair of bloom filtered used by delegation_blocked() was intended to
block delegations on given filehandles for between 30 and 60 seconds.  A
new filehandle would be recorded in the "new" bit set.  That would then
be switch to the "old" bit set between 0 and 30 seconds later, and it
would remain as the "old" bit set for 30 seconds.

Unfortunately the code intended to clear the old bit set once it reached
30 seconds old, preparing it to be the next new bit set, instead cleared
the *new* bit set before switching it to be the old bit set.  This means
that the "old" bit set is always empty and delegations are blocked
between 0 and 30 seconds.

This patch updates bd->new before clearing the set with that index,
instead of afterwards.

Reported-by: Olga Kornievskaia <okorniev@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 6282cd5655 ("NFSD: Don't hand out delegations for 30 seconds after recalling them.")
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-17 15:21:57 +02:00
..
acl.h
auth.c
auth.h
blocklayout.c nfsd: move nfserrno() to vfs.c 2024-03-06 14:45:15 +00:00
blocklayoutxdr.c nfsd: move nfserrno() to vfs.c 2024-03-06 14:45:15 +00:00
blocklayoutxdr.h
cache.h nfsd: make all of the nfsd stats per-network namespace 2024-08-19 06:00:05 +02:00
current_stateid.h
export.c NFSD: Fix frame size warning in svc_export_parse() 2024-08-19 06:00:04 +02:00
export.h NFSD: Fix frame size warning in svc_export_parse() 2024-08-19 06:00:04 +02:00
fault_inject.c
filecache.c nfsd: fix refcount leak when file is unhashed after being found 2024-10-17 15:21:05 +02:00
filecache.h NFSD: Convert filecache to rhltable 2024-03-26 18:20:23 -04:00
flexfilelayout.c nfsd: move nfserrno() to vfs.c 2024-03-06 14:45:15 +00:00
flexfilelayoutxdr.c NFSD: da_addr_body field missing in some GETDEVICEINFO replies 2023-09-13 09:42:49 +02:00
flexfilelayoutxdr.h
idmap.h
Kconfig nfsd: allow disabling NFSv2 at compile time 2024-03-06 14:45:15 +00:00
lockd.c
Makefile nfsd: allow disabling NFSv2 at compile time 2024-03-06 14:45:15 +00:00
netns.h nfsd: make svc_stat per-network namespace instead of global 2024-08-19 06:00:05 +02:00
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c
nfs4acl.c
nfs4callback.c NFSD: add support for sending CB_RECALL_ANY 2024-03-06 14:45:17 +00:00
nfs4idmap.c nfsd: call cache_put if xdr_reserve_space returns NULL 2024-10-17 15:21:08 +02:00
nfs4layouts.c
nfs4proc.c nfsd: Fix a regression in nfsd_setattr() 2024-08-29 17:30:53 +02:00
nfs4recover.c nfsd: return -EINVAL when namelen is 0 2024-10-17 15:21:08 +02:00
nfs4state.c nfsd: fix delegation_blocked() to block correctly for at least 30 seconds 2024-10-17 15:21:57 +02:00
nfs4xdr.c nfsd: Fix creation time serialization order 2024-03-26 18:20:24 -04:00
nfscache.c nfsd: make all of the nfsd stats per-network namespace 2024-08-19 06:00:05 +02:00
nfsctl.c nfsd: drop the nfsd_put helper 2024-08-29 17:30:53 +02:00
nfsd.h nfsd: drop the nfsd_put helper 2024-08-29 17:30:53 +02:00
nfsfh.c nfsd: make all of the nfsd stats per-network namespace 2024-08-19 06:00:05 +02:00
nfsfh.h NFSD: Use const pointers as parameters to fh_ helpers 2024-03-06 14:45:15 +00:00
nfsproc.c NFSD: Use set_bit(RQ_DROPME) 2024-03-06 14:45:17 +00:00
nfssvc.c nfsd: call nfsd_last_thread() before final nfsd_put() 2024-08-29 17:30:52 +02:00
nfsxdr.c
pnfs.h
state.h NFSD: add delegation reaper to react to low memory condition 2024-03-06 14:45:17 +00:00
stats.c nfsd: make svc_stat per-network namespace instead of global 2024-08-19 06:00:05 +02:00
stats.h nfsd: make svc_stat per-network namespace instead of global 2024-08-19 06:00:05 +02:00
trace.c
trace.h NFSD: Replace nfsd_prune_bucket() 2024-08-19 06:00:04 +02:00
vfs.c nfsd: Fix a regression in nfsd_setattr() 2024-08-29 17:30:53 +02:00
vfs.h nfsd: move nfserrno() to vfs.c 2024-03-06 14:45:15 +00:00
xdr3.h
xdr4.h NFSD: add support for sending CB_RECALL_ANY 2024-03-06 14:45:17 +00:00
xdr4cb.h NFSD: add support for sending CB_RECALL_ANY 2024-03-06 14:45:17 +00:00
xdr.h