]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/siw: Fix failure handling during device creation
authorBernard Metzler <bmt@zurich.ibm.com>
Mon, 2 Mar 2020 15:58:14 +0000 (16:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 12:00:29 +0000 (13:00 +0100)
commit5206be50b1de6daec0d1539220bc23ab7fb04a3d
treed129b8c5b24766b045e79f5351ce60d6f668a287
parenta38dbf0060e3d297ab401034d5bdcba39939e328
RDMA/siw: Fix failure handling during device creation

commit 11c1bd303bed4b64db6ad46614fd89ee8ce6a4db upstream.

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: 61ad0772382e ("rdma/siw: network and RDMA core interface")
Link: https://lore.kernel.org/r/20200302155814.9896-1-bmt@zurich.ibm.com
Reported-by: syzbot+2e80962bedd9559fe0b3@syzkaller.appspotmail.com
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/sw/siw/siw_main.c