History

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.

Colin Ian King committed 10 years ago

Commit e4618d41 parent c1cc72c1 file · +1 −1Browse files

Unified · Split

drivers/infiniband/sw/rdmavt/mr.c+1−1
@@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr) · 293 unmodified lines
294294 {
295295 rvt_deinit_mregion(&mr->mr);
296296 rvt_free_lkey(&mr->mr);
297− vfree(mr);
297+ kfree(mr);
298298 }
299299
300300 /**