aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-09-09 03:15:37 -0400
committerDoug Ledford <dledford@redhat.com>2016-09-16 14:14:23 -0400
commite4618d40eb3dc1a6d1f55f7150ea25bb23ab410a (patch)
tree587b46a8506c0d8bc6d66a81116e99fadd131bae /drivers/infiniband/sw/rdmavt
parentc1cc72cb6ff95cbe02ed747866576dccab4a5911 (diff)
IB/rdmavt: Don't vfree a kzalloc'ed memory region
The userspace memory region 'mr' is allocated with kzalloc in __rvt_alloc_mr however it is incorrectly being freed with vfree in __rvt_free_mr. Fix this by using kfree to free it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt')
-rw-r--r--drivers/infiniband/sw/rdmavt/mr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 80c4b6b401b8..46b64970058e 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr)
294{ 294{
295 rvt_deinit_mregion(&mr->mr); 295 rvt_deinit_mregion(&mr->mr);
296 rvt_free_lkey(&mr->mr); 296 rvt_free_lkey(&mr->mr);
297 vfree(mr); 297 kfree(mr);
298} 298}
299 299
300/** 300/**