linux/drivers/vdpa/mlx5/core
Li RongQing 23ae56d9e7 vdpa/mlx5: fix wrong list iterated in add_direct_chain error path
In add_direct_chain(), newly allocated direct MR entries are added to
the local list 'tmp', which is spliced into mr->head only on success.
On the error path, the cleanup loop was incorrectly iterating over
mr->head instead of tmp.

Fix by iterating over 'tmp' in the err_alloc cleanup path.

Fixes: 94abbccdf2 ("vdpa/mlx5: Add shared memory registration code")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260701113608.1972-1-lirongqing@baidu.com>
2026-08-19 06:38:46 -04:00
..
mlx5_vdpa.h vhost_iotlb: bound map allocation in add_range 2026-08-03 15:21:54 -04:00
mr.c vdpa/mlx5: fix wrong list iterated in add_direct_chain error path 2026-08-19 06:38:46 -04:00
resources.c vhost_iotlb: bound map allocation in add_range 2026-08-03 15:21:54 -04:00