diff options
| author | Trond Myklebust <[email protected]> | 2025-08-16 14:25:20 +0000 |
|---|---|---|
| committer | Trond Myklebust <[email protected]> | 2025-08-19 18:16:02 +0000 |
| commit | 76d2e3890fb169168c73f2e4f8375c7cc24a765e (patch) | |
| tree | 5d23b867c67851ea8ba45cbbd2ad1a85b74e3cc0 /drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c | |
| parent | Linux 6.17-rc2 (diff) | |
| download | kernel-76d2e3890fb169168c73f2e4f8375c7cc24a765e.tar.gz kernel-76d2e3890fb169168c73f2e4f8375c7cc24a765e.zip | |
NFS: Fix a race when updating an existing write
After nfs_lock_and_join_requests() tests for whether the request is
still attached to the mapping, nothing prevents a call to
nfs_inode_remove_request() from succeeding until we actually lock the
page group.
The reason is that whoever called nfs_inode_remove_request() doesn't
necessarily have a lock on the page group head.
So in order to avoid races, let's take the page group lock earlier in
nfs_lock_and_join_requests(), and hold it across the removal of the
request in nfs_inode_remove_request().
Reported-by: Jeff Layton <[email protected]>
Tested-by: Joe Quanaim <[email protected]>
Tested-by: Andrew Steffen <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Fixes: bd37d6fce184 ("NFSv4: Convert nfs_lock_and_join_requests() to use nfs_page_find_head_request()")
Cc: [email protected]
Signed-off-by: Trond Myklebust <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c')
0 files changed, 0 insertions, 0 deletions
