Skip to contentSkip to conversation

IB/mlx5: Replace kfree with kvfree

PATCH Superseded Chuhong Yuan 1 participant 1 message Jul 17, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/mlx5: Replace kfree with kvfree

Variable allocated by kvzalloc should not be freed by kfree. Because it may be allocated by vmalloc.
So replace kfree with kvfree here.

---
 drivers/infiniband/hw/mlx5/odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/odp.c +1 -1
index 5b642d81e617..ea4b41b260b3 100644
@@ -1813,7 +1813,7 @@ int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
 	if (valid_req)
 		queue_work(system_unbound_wq, &work->work);
 	else
-		kfree(work);
+		kvfree(work);
 
 	srcu_read_unlock(&dev->mr_srcu, srcu_key);
 
Signature · 1 line
2.20.1