Re: [Patch for-rc v2] RDMA/siw: Fix failure handling during device creation

From: Jason Gunthorpe
Date: Wed Mar 04 2020 - 13:28:02 EST


On Mon, Mar 02, 2020 at 04:58:14PM +0100, Bernard Metzler wrote:
> A failing call to ib_device_set_netdev() during device creation
> caused system crash due to xa_destroy of uninitialized xarray
> hit by device deallocation. Fixed by moving xarray initialization
> before potential device deallocation.
>
> Fixes: bdcf26bf9b3a (rdma/siw: network and RDMA core interface)
> Reported-by: syzbot+2e80962bedd9559fe0b3@xxxxxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx>
> ---
> v1 -> v2:
> - Fix here only potential system crash during failing device
> creation, but not missing correct error propagation.
>
> drivers/infiniband/sw/siw/siw_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to for-rc

Thanks,
Jason