summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYunjian Wang <wangyunjian@huawei.com>2020-12-29 10:01:48 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-12 20:09:08 +0100
commitda35ba33e1261de495ff05af89e96f78d8492483 (patch)
tree9dfc25ab87e67f635630608923ecaa64c11a8f78 /include
parent96d3717362a38c74491f1e2549b9c3080a601871 (diff)
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: bab632d69ee4 ("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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions