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.
Unified · Split
| @@ -294,7 +294,7 @@ static void __rvt_free_mr(struct rvt_mr *mr) · 293 unmodified lines | ||
| 294 | 294 | { |
| 295 | 295 | rvt_deinit_mregion(&mr->mr); |
| 296 | 296 | rvt_free_lkey(&mr->mr); |
| 297 | − vfree(mr); | |
| 297 | + kfree(mr); | |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | /** |