On Thu, Nov 14, 2024 at 11:53:17AM +0200, Yishai Hadas wrote: > Fix an unwind issue in mlx5vf_add_migration_pages(). > > If a set of pages is allocated but fails to be added to the SG table, > they need to be freed to prevent a memory leak. > > Any pages successfully added to the SG table will be freed as part of > mlx5vf_free_data_buffer(). > > Fixes: 6fadb021266d ("vfio/mlx5: Implement vfio_pci driver for mlx5 devices") > Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxx> > --- > drivers/vfio/pci/mlx5/cmd.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Jason