]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 13 Mar 2020 12:38:56 +0000 (13:38 +0100)
commitff5139e2cace39fe8354008a7c532c29311c7483
tree96dadbe1dfe2879c70490500709d751c693ba3c8
parent5ddbf276748754d39bc74b835769fd3c6f695b69
RDMA/siw: Fix failure handling during device creation

BugLink: https://bugs.launchpad.net/bugs/1867178
commit 12e5eef0f4d8087ea7b559f6630be08ffea2d851 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: bdcf26bf9b3a ("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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/infiniband/sw/siw/siw_main.c