RE: [PATCH net v5 1/2] vhost_net: fix ubuf refcount incorrectly when sendmsg fails

2020-12-28 Thread wangyunjian
-foundation.org; Lilijun (Jerry) > ; chenchanghu ; > xudingke ; huangbin (J) > > Subject: Re: [PATCH net v5 1/2] vhost_net: fix ubuf refcount incorrectly when > sendmsg fails > > On Sun, Dec 27, 2020 at 6:26 AM Michael S. Tsirkin wrote: > > > > On Fri, Dec 25, 2020 at

Re: [PATCH net v5 1/2] vhost_net: fix ubuf refcount incorrectly when sendmsg fails

2020-12-27 Thread Willem de Bruijn
On Sun, Dec 27, 2020 at 6:26 AM Michael S. Tsirkin wrote: > > On Fri, Dec 25, 2020 at 03:24:25PM +0800, wangyunjian wrote: > > From: Yunjian Wang > > > > Currently the vhost_zerocopy_callback() maybe be called to decrease > > the refcount when sendmsg fails in tun. The error handling in vhost > >

Re: [PATCH net v5 1/2] vhost_net: fix ubuf refcount incorrectly when sendmsg fails

2020-12-27 Thread Michael S. Tsirkin
On Fri, Dec 25, 2020 at 03:24:25PM +0800, wangyunjian wrote: > From: Yunjian Wang > > 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. > Th

[PATCH net v5 1/2] vhost_net: fix ubuf refcount incorrectly when sendmsg fails

2020-12-24 Thread wangyunjian
From: Yunjian Wang 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