NFSD: Avoid corruption of a referring call list
Subsystems (2)
Chuck Lever
maintainerPATCH 1/1 NFSD: Avoid corruption of a referring call list
From: Chuck Lever <[email protected]>
The new code neglects to remove a freshly-allocated RCL from the callback's referring call list when no matching referring call is found.
Reported-by kernel test robot <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Fixes 4f3c8d8c9e10 ("NFSD: Implement CB_SEQUENCE referring call lists")
Signed-off-by Chuck Lever <[email protected]>
--- fs/nfsd/nfs4callback.c | 1 + 1 file changed, 1 insertion(+)
I don't recall seeing this on the mailing list. Targeting this one for nfsd-fixes.
fs/nfsd/nfs4callback.c +1 -0
@@ -1409,6 +1409,7 @@ void nfsd41_cb_referring_call(struct nfsd4_callback *cb, out:if (!rcl->__nr_referring_calls) { cb->cb_nr_referring_call_list--; +list_del (&rcl->__list);kfree (rcl); } }
Signature · 1 line
2.49.0
Quoted 24 lines · Chuck Lever
From: Chuck Lever <[email protected]>
The new code neglects to remove a freshly-allocated RCL from the callback's referring call list when no matching referring call is found.
Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Fixes 4f3c8d8c9e10 ("NFSD: Implement CB_SEQUENCE referring call lists")Signed-off-by Chuck Lever <[email protected]>--- fs/nfsd/nfs4callback.c | 1 + 1 file changed, 1 insertion(+)I don't recall seeing this on the mailing list. Targeting this one for nfsd-fixes.
fs/nfsd/nfs4callback.c +0
-0
fs/nfsd/nfs4callback.c void nfsd41_cb_referring_call(struct nfsd4_callback *cb, · line 1415
Quoted 7 lines
fs/nfsd/nfs4callback.c +1
-0@@ -1409,6 +1409,7 @@ void nfsd41_cb_referring_call(struct nfsd4_callback *cb, out:if (!rcl->__nr_referring_calls) { cb->cb_nr_referring_call_list--; +list_del (&rcl->__list);kfree (rcl); } }
Nice catch.
Reviewed-by Jeff Layton <[email protected]>