NFSD: Avoid corruption of a referring call list
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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202505171002.cE46sdj5-lkp@intel.com/
Fixes: 4f3c8d8c9e ("NFSD: Implement CB_SEQUENCE referring call lists")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
pull/1271/head
parent
425364dc49
commit
32ce6b3a83
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue