Skip to content

Commit b7f406b

Browse files
WillLesterjgunthorpe
authored andcommitted
IB/mlx5: Replace kfree with kvfree
Memory allocated by kvzalloc should not be freed by kfree(), use kvfree() instead. Fixes: 813e90b ("IB/mlx5: Add advise_mr() support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Chuhong Yuan <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent c56b593 commit b7f406b

File tree

1 file changed

+2
-2
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/mlx5/odp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,7 @@ static void mlx5_ib_prefetch_mr_work(struct work_struct *work)
17711771

17721772
num_pending_prefetch_dec(to_mdev(w->pd->device), w->sg_list,
17731773
w->num_sge, 0);
1774-
kfree(w);
1774+
kvfree(w);
17751775
}
17761776

17771777
int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
@@ -1813,7 +1813,7 @@ int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
18131813
if (valid_req)
18141814
queue_work(system_unbound_wq, &work->work);
18151815
else
1816-
kfree(work);
1816+
kvfree(work);
18171817

18181818
srcu_read_unlock(&dev->mr_srcu, srcu_key);
18191819

0 commit comments

Comments
 (0)