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

2020-12-13 Thread Jason Wang
On 2020/12/14 上午11:56, Willem de Bruijn wrote: On Sun, Dec 13, 2020 at 10:54 PM Willem de Bruijn wrote: On Sun, Dec 13, 2020 at 10:30 PM Jason Wang wrote: On 2020/12/14 上午9:32, Willem de Bruijn wrote: On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn wrote: afterwards, the error handling

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

2020-12-13 Thread Willem de Bruijn
On Sun, Dec 13, 2020 at 10:54 PM Willem de Bruijn wrote: > > On Sun, Dec 13, 2020 at 10:30 PM Jason Wang wrote: > > > > > > On 2020/12/14 上午9:32, Willem de Bruijn wrote: > > > On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn > > > wrote: > > > afterwards, the error handling in vhost

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

2020-12-13 Thread Willem de Bruijn
On Sun, Dec 13, 2020 at 10:30 PM Jason Wang wrote: > > > On 2020/12/14 上午9:32, Willem de Bruijn wrote: > > On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn > > wrote: > > afterwards, the error handling in vhost handle_tx() will try to > > decrease the same refcount again. This is wrong

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

2020-12-13 Thread Jason Wang
On 2020/12/14 上午9:32, Willem de Bruijn wrote: On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn wrote: afterwards, the error handling in vhost handle_tx() will try to decrease the same refcount again. This is wrong and fix this by delay copying ubuf_info until we're sure there's no errors. I

Re: [PATCH net] vhost_net: fix high cpu load when sendmsg fails

2020-12-13 Thread Jason Wang
On 2020/12/11 下午3:37, wangyunjian wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, December 11, 2020 10:53 AM To: wangyunjian ; Michael S. Tsirkin Cc: virtualization@lists.linux-foundation.org; net...@vger.kernel.org; Lilijun (Jerry) ; chenchanghu ;

Re: [PATCH net] vhost_net: fix high cpu load when sendmsg fails

2020-12-13 Thread Jason Wang
On 2020/12/11 下午3:37, wangyunjian wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, December 11, 2020 10:53 AM To: wangyunjian ; Michael S. Tsirkin Cc: virtualization@lists.linux-foundation.org; net...@vger.kernel.org; Lilijun (Jerry) ; chenchanghu ;

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

2020-12-13 Thread Willem de Bruijn
On Sat, Dec 12, 2020 at 7:18 PM Willem de Bruijn wrote: > > > > > afterwards, the error handling in vhost handle_tx() will try to > > > > decrease the same refcount again. This is wrong and fix this by delay > > > > copying ubuf_info until we're sure there's no errors. > > > > > > I think the