android_kernel_sony_sdm845/drivers/vhost
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yunjian Wang f1f4a514bb vhost_net: fix ubuf refcount incorrectly when sendmsg fails
[ Upstream commit 01e31bea7e622f1890c274f4aaaaf8bccd296aa5 ]

Currently the vhost_zerocopy_callback() maybe be called to decrease
the refcount when sendmsg fails in tun. The error handling in vhost
handle_tx_zerocopy() will try to decrease the same refcount again.
This is wrong. To fix this issue, we only call vhost_net_ubuf_put()
when vq->heads[nvq->desc].len == VHOST_DMA_IN_PROGRESS.

Fixes: bab632d69e ("vhost: vhost TX zero-copy support")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/1609207308-20544-1-git-send-email-wangyunjian@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 19:49:02 +01:00
..
Kconfig vhost: split out vringh Kconfig 2016-08-02 16:54:28 +03:00
Kconfig.vringh vhost: split out vringh Kconfig 2016-08-02 16:54:28 +03:00
Makefile
net.c vhost_net: fix ubuf refcount incorrectly when sendmsg fails 2021-01-12 19:49:02 +01:00
scsi.c vhost: scsi: add weight support 2019-08-25 10:51:42 +02:00
test.c vhost/test: fix build for vhost test 2019-09-16 08:19:33 +02:00
test.h
vhost.c vhost: make sure log_num < in_num 2019-09-16 08:19:34 +02:00
vhost.h vhost: introduce vhost_exceeds_weight() 2019-08-25 10:51:41 +02:00
vringh.c vringh: fix __vringh_iov() when riov and wiov are different 2020-11-10 10:23:59 +01:00
vsock.c vhost: vsock: kick send_pkt worker once device is started 2020-05-10 10:28:00 +02:00