Re: [PATCH rdma-rc] IB/mlx5: Fix mlx5_ib_alloc_mr error flow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 26, 2017 at 11:20:20AM +0200, Leon Romanovsky wrote:
> From: Nitzan Carmi <nitzanc@xxxxxxxxxxxx>
> 
> ibmr.device is being set only after ib_alloc_mr() is
> (successfully) complete. Therefore, in case mlx5_core_create_mkey()
> return with error, the error flow calls mlx5_free_priv_descs()
> which uses ibmr.device (which doesn't exist yet), causing
> NULL dereference and gets the system into kernel panic.
> 
> To fix this, the IB device should be given to mr struct in earlier
> stage (e.g. prior to calling mlx5_core_create_mkey()).
> 
> Fixes: 8a187ee52b04 ("IB/mlx5: Support the new memory registration API")
> Signed-off-by: Max Gurtovoy <maxg@xxxxxxxxxxxx>
> Signed-off-by: Nitzan Carmi <nitzanc@xxxxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
>  drivers/infiniband/hw/mlx5/mr.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-rc, thanks

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux