From: Colin Ian King Date: Fri, 9 Sep 2016 07:15:37 +0000 (+0100) Subject: IB/rdmavt: Don't vfree a kzalloc'ed memory region X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4618d40eb3dc1a6d1f55f7150ea25bb23ab410a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- 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) { rvt_deinit_mregion(&mr->mr); rvt_free_lkey(&mr->mr); - vfree(mr); + kfree(mr); } /**