projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c56b593
)
IB/mlx5: Replace kfree with kvfree
author
Chuhong Yuan
<hslester96@gmail.com>
Wed, 17 Jul 2019 08:21:01 +0000
(16:21 +0800)
committer
Jason Gunthorpe
<jgg@mellanox.com>
Mon, 22 Jul 2019 18:19:40 +0000
(15:19 -0300)
Memory allocated by kvzalloc should not be freed by kfree(), use kvfree()
instead.
Fixes:
813e90b1aeaa
("IB/mlx5: Add advise_mr() support")
Link:
https://lore.kernel.org/r/20190717082101.14196-1-hslester96@gmail.com
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/odp.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx5/odp.c
b/drivers/infiniband/hw/mlx5/odp.c
index
5b642d8
..
36ba901
100644
(file)
--- a/
drivers/infiniband/hw/mlx5/odp.c
+++ b/
drivers/infiniband/hw/mlx5/odp.c
@@
-1771,7
+1771,7
@@
static void mlx5_ib_prefetch_mr_work(struct work_struct *work)
num_pending_prefetch_dec(to_mdev(w->pd->device), w->sg_list,
w->num_sge, 0);
- kfree(w);
+ k
v
free(w);
}
int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd,
@@
-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);
+ k
v
free(work);
srcu_read_unlock(&dev->mr_srcu, srcu_key);