freebsd-dev/sys/ofed
Hans Petter Selasky df9bb49b66 Fix kernel crash during fail to initialize device in ibcore.
This patch fixes the kernel crash that occurs during ib_dealloc_device()
called due to provider driver fails with an error after
ib_alloc_device() and before it can register using ib_register_device().

This crashed seen in tha lab as below which can occur with any IB device
which fails to perform its device initialization before invoking
ib_register_device().

This patch avoids touching cache and port immutable structures if device
is not yet initialized.
It also releases related memory when cache and port immutable data
structure initialization fails during register_device() state.

Linux commit:
4be3a4fa51f432ef045546d16f25c68a1ab525b9

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2018-07-17 09:26:09 +00:00
..
drivers/infiniband Fix kernel crash during fail to initialize device in ibcore. 2018-07-17 09:26:09 +00:00
include Check AF family prior resolving address and introduce safer rdma_addr_size() variants in ibcore. 2018-07-17 09:24:39 +00:00