mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
RDMA/mlx5: Fix mkey creation error flow rollback
Fix the indices of mkeys destroyed in case of an error in batch mkey
creation.
Fixes: 36680ef7bc ("RDMA/mlx5: Switch from MR cache to FRMR pools")
Link: https://patch.msgid.link/r/20260610000145.820592-2-michaelgur@nvidia.com
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
8b0c66fa05
commit
c70fcfa988
|
|
@ -294,7 +294,7 @@ static int mlx5r_create_mkeys(struct ib_device *device, struct ib_frmr_key *key,
|
|||
free_in:
|
||||
kfree(in);
|
||||
if (err)
|
||||
for (; i > 0; i--)
|
||||
for (i--; i >= 0; i--)
|
||||
mlx5_core_destroy_mkey(dev->mdev, handles[i]);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user