aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/workqueue.c
diff options
context:
space:
mode:
authorMike Snitzer <[email protected]>2024-10-03 19:34:58 +0000
committerAnna Schumaker <[email protected]>2024-10-03 20:19:43 +0000
commit65f2a5c366353da6fa724c68347e1de954928143 (patch)
tree3dbc942931e5b9c55c54519e9fcf846b841cd8be /rust/helpers/workqueue.c
parentNFSv4: Prevent NULL-pointer dereference in nfs42_complete_copies() (diff)
downloadkernel-65f2a5c366353da6fa724c68347e1de954928143.tar.gz
kernel-65f2a5c366353da6fa724c68347e1de954928143.zip
nfs_common: fix race in NFS calls to nfsd_file_put_local() and nfsd_serv_put()
Add nfs_to_nfsd_file_put_local() interface to fix race with nfsd module unload. Similarly, use RCU around nfs_open_local_fh()'s error path call to nfs_to->nfsd_serv_put(). Holding RCU ensures that NFS will safely _call and return_ from its nfs_to calls into the NFSD functions nfsd_file_put_local() and nfsd_serv_put(). Otherwise, if RCU isn't used then there is a narrow window when NFS's reference for the nfsd_file and nfsd_serv are dropped and the NFSD module could be unloaded, which could result in a crash from the return instruction for either nfs_to->nfsd_file_put_local() or nfs_to->nfsd_serv_put(). Reported-by: NeilBrown <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions