aboutsummaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorYunjian Wang <[email protected]>2020-12-29 02:01:48 +0000
committerJakub Kicinski <[email protected]>2021-01-04 21:18:52 +0000
commit01e31bea7e622f1890c274f4aaaaf8bccd296aa5 (patch)
tree2921fb5f2a2e41f54389133e5dbf0b26593422a5 /net/lapb/lapb_iface.c
parentbareudp: Fix use of incorrect min_headroom size (diff)
downloadkernel-01e31bea7e622f1890c274f4aaaaf8bccd296aa5.tar.gz
kernel-01e31bea7e622f1890c274f4aaaaf8bccd296aa5.zip
vhost_net: fix ubuf refcount incorrectly when sendmsg fails
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 <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions