diff options
author | 2024-08-26 10:32:34 -0400 | |
---|---|---|
committer | 2024-08-26 19:04:00 -0400 | |
commit | 7e8ae8486e4471513e2111aba6ac29f2357bed2a (patch) | |
tree | ad3822cd62bc216375fac05bd1cfb3a45ab837bc /scripts/generate_rust_analyzer.py | |
parent | nfsd: fix potential UAF in nfsd4_cb_getattr_release (diff) | |
download | wireguard-linux-7e8ae8486e4471513e2111aba6ac29f2357bed2a.tar.xz wireguard-linux-7e8ae8486e4471513e2111aba6ac29f2357bed2a.zip |
fs/nfsd: fix update of inode attrs in CB_GETATTR
Currently, we copy the mtime and ctime to the in-core inode and then
mark the inode dirty. This is fine for certain types of filesystems, but
not all. Some require a real setattr to properly change these values
(e.g. ceph or reexported NFS).
Fix this code to call notify_change() instead, which is the proper way
to effect a setattr. There is one problem though:
In this case, the client is holding a write delegation and has sent us
attributes to update our cache. We don't want to break the delegation
for this since that would defeat the purpose. Add a new ATTR_DELEG flag
that makes notify_change bypass the try_break_deleg call.
Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation")
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions