[dpdk-dev] [PATCH 4/8] ipc: fix vfio memleak

Burakov, Anatoly anatoly.burakov at intel.com
Tue Apr 23 10:29:08 CEST 2019


On 17-Apr-19 3:41 PM, Herakliusz Lipiec wrote:
> When sending multiple requests, rte_mp_request_sync
> can succeed sending a few of those requests, but then
> fail on a later one and in the end return with rc=-1.
> The upper layers - e.g. device hotplug - currently
> handles this case as if no messages were sent and no
> memory for response buffers was allocated, which is
> not true. Fixed by always freeing reply message buffers.

This commit message is duplicated in multiple commits, and does not 
really describe the problem you're fixing. Since you've already updated 
the IPC API docs to ask caller to free even in case of failure, i think 
here (and in other similar patches) it is sufficient to just say 
something like:

When sending synchronous IPC requests, the caller must free the response 
buffer even if the request returned failure. Fix the code to correctly 
use the IPC API.

> 
> Fixes: 83a73c5fef66 ("vfio: use generic multi-process channel")
> Cc: jianfeng.tan at intel.com
> Cc: stable at dpdk.org
> Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec at intel.com>
> ---

For actual code,

Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

-- 
Thanks,
Anatoly


More information about the dev mailing list