NFSD: Fix use-after-free warning when doing inter-server copy
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | NFSD: Fix use-after-free warning when doing inter-server copyfs/ | +1 | 16 replies | |
| 2/2 | NFSD: fix missing refcount in nfsd4_copy by nfsd4_do_async_copyfs/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] NFSD: Fix use-after-free warning when doing inter-server copy
Observed use-after-free messages in /var/log/messages of destination server when doing inter-server copy. These come from 2 different places in the code, one from the nfsd4_cleanup_inter_ssc when nfsd_file_put is called for the source file and the other from nfs4_put_copy when it's called from nfsd4_cb_offload_release.
Fixed by removing the call to nfsd_file_put; the object is not allocated by nfsd_file_alloc, and by initializing refcount for nfsd4_copy in nfsd4_do_async_copy.
fs/nfsd/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)