When receiving a msg with a kRPC zero-copy buffer, kRPC lookups the corresponding fuse request to get the actual buffer. However the fuse request could have been killed and having its buffer released. In case like this, it is not appropriate to return a fatal error to userspace, instead we return a positive error value to represent non-fatal error that pertains to the msg only so that userspace can adapt accordingly.
Related to #VSTOR-98219 Signed-off-by: Liu Kui <kui....@virtuozzo.com> --- fs/fuse/kio/pcs/pcs_krpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c index b7509069fb11..4f68e8706334 100644 --- a/fs/fuse/kio/pcs/pcs_krpc.c +++ b/fs/fuse/kio/pcs/pcs_krpc.c @@ -484,8 +484,8 @@ static int pcs_krpc_ioctl_send_msg(struct pcs_krpc *krpc, struct pcs_krpc_ioc_se chunk->type = KRPC_CHUNK_TYPE_ZC; chunk->addr = chunk_bdzc->offset; chunk->req = fuse_dev_find_request(chunk_bdzc->devfd, chunk_bdzc->unique); - if (!chunk->req) { - res = -ENXIO; + if (!chunk->req || chunk->req->args->killed) { + res = PCS_ERR_NET; goto err_free_data_chunk; } break; -- 2.39.5 (Apple Git-154) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel