linux/drivers/infiniband
Leon Romanovsky 5a371cf87e IB/mlx4: Fix mlx4_ib_alloc_mr error flow
ibmr.device is being set only after ib_alloc_mr() is successfully complete.
Therefore, in case imlx4_mr_enable() returns with error, the error flow
unwinder calls to mlx4_free_priv_pages(), which uses ibmr.device.

Such usage causes to NULL dereference oops and to fix it, the IB device
should be set in the mr struct earlier stage (e.g. prior to calling
mlx4_free_priv_pages()).

Fixes: 1b2cd0fc67 ("IB/mlx4: Support the new memory registration API")
Signed-off-by: Nitzan Carmi <nitzanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-01-02 11:09:05 -07:00
..
core IB/core: Verify that QP is security enabled in create and destroy 2017-12-27 15:24:41 -07:00
hw IB/mlx4: Fix mlx4_ib_alloc_mr error flow 2018-01-02 11:09:05 -07:00
sw Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
ulp IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush 2017-12-21 16:06:07 -07:00
Kconfig IB: INFINIBAND should depend on HAS_DMA 2017-11-30 16:01:28 -07:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00