[dpdk-dev] [PATCH v2] net/virtio-user: fix run close(0) and close callfd

Maxime Coquelin maxime.coquelin at redhat.com
Fri Jan 8 10:14:43 CET 2021



On 12/11/20 6:11 PM, Jiawei Zhu wrote:
> From: Jiawei Zhu <zhujiawei12 at huawei.com>
> 
> When i < VIRTIO_MAX_VIRTQUEUES and j == i,
> dev->callfds[i] and dev->kickfds[i] are default 0.
> So it will close(0), close the standard input (stdin).
> And when the code fails in kickfd creation,
> it will leaves one callfd not closed.
> 
> Fixes: e6e7ad8b3024 ("net/virtio-user: move eventfd open/close into init/uninit")
> Cc: stable at dpdk.org:
> 
> Signed-off-by: Jiawei Zhu <zhujiawei12 at huawei.com>
> ---
> v2:
> * Add close callfd when fail in kickfd creation before break.
> ---
> ---
>  drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)


Series applied to dpdk-next-virtio/main.

Thanks,
Maxime



More information about the dev mailing list