diff options
author | Andrey Smetanin <[email protected]> | 2023-04-24 23:44:11 +0300 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2023-06-08 15:43:08 -0400 |
commit | 1f5d2e3bab16369d5d4b4020a25db4ab1f4f082c (patch) | |
tree | fec6d47fc4c1f4134c4871e4afdd93067d6ae1db /lib/mpi/mpiutil.c | |
parent | 376daf317753ccb6b1ecbdece66018f7f6313a7f (diff) |
vhost_net: revert upend_idx only on retriable error
Fix possible virtqueue used buffers leak and corresponding stuck
in case of temporary -EIO from sendmsg() which is produced by
tun driver while backend device is not up.
In case of no-retriable error and zcopy do not revert upend_idx
to pass packet data (that is update used_idx in corresponding
vhost_zerocopy_signal_used()) as if packet data has been
transferred successfully.
v2: set vq->heads[ubuf->desc].len equal to VHOST_DMA_DONE_LEN
in case of fake successful transmit.
Signed-off-by: Andrey Smetanin <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Andrey Smetanin <[email protected]>
Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions