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-07 Thread wangyunjian
wangyunjian ; m...@redhat.com > >> Cc: virtualizat...@lists.linux-foundation.org; netdev@vger.kernel.org; > Lilijun > >> (Jerry) ; xudingke > >> Subject: Re: [PATCH net-next] tun: fix ubuf refcount incorrectly on error > >> path > >> > >> > >

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

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

2020-12-04 Thread wangyunjian
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, December 4, 2020 2:11 PM > To: wangyunjian ; m...@redhat.com > Cc: virtualizat...@lists.linux-foundation.org; netdev@vger.kernel.org; Lilijun > (Jerry) ; xudingke > Subject: Re: [PAT

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 tr