Re: [PATCH net-next] tun: fix ubuf refcount incorrectly on error path

2020-12-09 Thread Jason Wang
On 2020/12/8 上午10:32, Jason Wang wrote: On 2020/12/7 下午9:38, wangyunjian wrote: I think the newly added code is easy to miss this problem, so I want to copy ubuf_info until we're sure there's no errors. Thanks, Yunjian But isn't this actually a disabling of zerocopy? Thanks Sorry, I

Re: [PATCH net-next] tun: fix ubuf refcount incorrectly on error path

2020-12-07 Thread Jason Wang
On 2020/12/7 下午9:38, wangyunjian wrote: I think the newly added code is easy to miss this problem, so I want to copy ubuf_info until we're sure there's no errors. Thanks, Yunjian But isn't this actually a disabling of zerocopy? Thanks ___

Re: [PATCH net-next] tun: fix ubuf refcount incorrectly on error path

2020-12-06 Thread Jason Wang
: Re: [PATCH net-next] tun: fix ubuf refcount incorrectly on error path On 2020/12/3 下午4:00, wangyunjian wrote: From: Yunjian Wang After setting callback for ubuf_info of skb, the callback (vhost_net_zerocopy_callback) will be called to decrease the refcount when freeing skb. But when an exception

Re: [PATCH net-next] tun: fix ubuf refcount incorrectly on error path

2020-12-03 Thread Jason Wang
On 2020/12/3 下午4:00, wangyunjian wrote: From: Yunjian Wang After setting callback for ubuf_info of skb, the callback (vhost_net_zerocopy_callback) will be called to decrease the refcount when freeing skb. But when an exception occurs afterwards, the error handling in vhost handle_tx() will