Re: [dpdk-dev] [PATCH v3 1/3] vhost: fix error path when setting memory tables

2020-11-12 Thread Maxime Coquelin
On 11/11/20 7:06 AM, Xueming(Steven) Li wrote: >> @@ -1012,16 +1018,13 @@ vhost_user_set_mem_table(struct virtio_net >> **pdev, struct VhostUserMsg *msg, >> if (memory->nregions > VHOST_MEMORY_MAX_NREGIONS) { >> VHOST_LOG_CONFIG(ERR, >> "too many memory reg

Re: [dpdk-dev] [PATCH v3 1/3] vhost: fix error path when setting memory tables

2020-11-10 Thread Xueming(Steven) Li
elin >Subject: [dpdk-dev] [PATCH v3 1/3] vhost: fix error path when setting memory >tables > >If an error is encountered before the memory regions are parsed, the file >descriptors for these shared buffers are leaked. > >This patch fixes this by closing the message file desc

[dpdk-dev] [PATCH v3 1/3] vhost: fix error path when setting memory tables

2020-11-09 Thread Maxime Coquelin
If an error is encountered before the memory regions are parsed, the file descriptors for these shared buffers are leaked. This patch fixes this by closing the message file descriptors on error, taking care of avoiding double closing of the file descriptors. guest_pages is also freed, even though