linux_dsm_epyc7002/drivers/infiniband
Jack Morgenstein 53e9a5a692 RDMA/core: Do not indicate device ready when device enablement fails
[ Upstream commit 779e0bf47632c609c59f527f9711ecd3214dccb0 ]

In procedure ib_register_device, procedure kobject_uevent is called
(advertising that the device is ready for userspace usage) even when
device_enable_and_get() returned an error.

As a result, various RDMA modules attempted to register for the device
even while the device driver was preparing to unregister the device.

Fix this by advertising the device availability only after enabling the
device succeeds.

Fixes: e7a5b4aafd ("RDMA/device: Don't fire uevent before device is fully initialized")
Link: https://lore.kernel.org/r/20201208073545.9723-3-leon@kernel.org
Suggested-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:53:47 +01:00
..
core RDMA/core: Do not indicate device ready when device enablement fails 2020-12-30 11:53:47 +01:00
hw RDMA/hns: Bugfix for calculation of extended sge 2020-12-30 11:53:28 +01:00
sw RDMA/rxe: Compute PSN windows correctly 2020-12-30 11:52:58 +01:00
ulp RDMA/rtrs-srv: Don't guard the whole __alloc_srv with srv_mutex 2020-12-30 11:52:59 +01:00
Kconfig RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs 2020-11-12 13:27:41 -04:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00