Skip to content

Commit

Permalink
IB/mlx4: Set umem field to NULL in mlx4_ib_alloc_fast_reg_mr()
Browse files Browse the repository at this point in the history
Set mr->umem to NULL in mlx4_ib_alloc_fast_reg_mr(). Otherwise
ib_dereg_mr() may invoke ib_umem_release() on a random pointer value
and get an oops.

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Vladimir Sokolovsky authored and Roland Dreier committed Nov 5, 2008
1 parent 7b0f5df commit 7f3abf5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/hw/mlx4/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ struct ib_mr *mlx4_ib_alloc_fast_reg_mr(struct ib_pd *pd,
goto err_mr;

mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key;
mr->umem = NULL;

return &mr->ibmr;

Expand Down

0 comments on commit 7f3abf5

Please sign in to comment.