[dpdk-dev] [PATCH v3] vhost: fix leak of fds and mmaps

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Feb 19 16:08:32 CET 2016


2016-02-10 10:40, Rich Lane:
> The common vhost code only supported a single mmap per device. vhost-user
> worked around this by saving the address/length/fd of each mmap after the end
> of the rte_virtio_memory struct. This only works if the vhost-user code frees
> dev->mem, since the common code is unaware of the extra info. The
> VHOST_USER_RESET_OWNER message is one situation where the common code frees
> dev->mem and leaks the fds and mappings. This happens every time I shut down a
> VM.
> 
> The new code calls back into the implementation (vhost-user or vhost-cuse) to
> clean up these resources.
> 
> The vhost-cuse changes are only compile tested.
> 
> Signed-off-by: Rich Lane <rlane at bigswitch.com>
> Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>

Applied, thanks



More information about the dev mailing list