Skip to content

Commit

Permalink
IB/rdmavt: Don't vfree a kzalloc'ed memory region
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Acked-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
Colin Ian King authored and dledford committed Sep 16, 2016
1 parent c1cc72c commit e4618d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rdmavt/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit e4618d4

Please sign in to comment.