aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
diff options
context:
space:
mode:
authorNeilBrown <[email protected]>2025-05-09 00:46:43 +0000
committerAnna Schumaker <[email protected]>2025-05-28 21:17:14 +0000
commitc25a89770d1f216dcedfc2d25d56b604f62ce0bd (patch)
treee5e0c6ebad5ceb43497f1a50ec9d99e84b8285eb /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
parentnfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh() (diff)
downloadkernel-c25a89770d1f216dcedfc2d25d56b604f62ce0bd.tar.gz
kernel-c25a89770d1f216dcedfc2d25d56b604f62ce0bd.zip
nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer
Instead of calling xchg() and unrcu_pointer() before nfsd_file_put_local(), we now pass pointer to the __rcu pointer and call xchg() and unrcu_pointer() inside that function. Where unrcu_pointer() is currently called the internals of "struct nfsd_file" are not known and that causes older compilers such as gcc-8 to complain. In some cases we have a __kernel (aka normal) pointer not an __rcu pointer so we need to cast it to __rcu first. This is strictly a weakening so no information is lost. Somewhat surprisingly, this cast is accepted by gcc-8. This has the pleasing result that the cmpxchg() which sets ro_file and rw_file, and also the xchg() which clears them, are both now in the nfsd code. Reported-by: Pali Rohár <[email protected]> Reported-by: Vincent Mailhol <[email protected]> Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
0 files changed, 0 insertions, 0 deletions