Home
last modified time | relevance | path

Searched hist:af1cc7a2b86ddb8668ac38097866bedd7b849a76 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/
H A Dtun.cdiff af1cc7a2b86ddb8668ac38097866bedd7b849a76 Tue Nov 29 23:17:51 CST 2016 Jason Wang <jasowang@redhat.com> tun: handle ubuf refcount correctly when meet errors

We trigger uarg->callback() immediately after we decide do datacopy
even if caller want to do zerocopy. This will cause the callback
(vhost_net_zerocopy_callback) decrease the refcount. But when we meet
an error afterwards, the error handling in vhost handle_tx() will try
to decrease it again. This is wrong and fix this by delay the
uarg->callback() until we're sure there's no errors.

Reported-by: wangyunjian <wangyunjian@huawei.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>