diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2020-12-08 10:35:44 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-12-10 22:05:17 +0300 |
commit | 779e0bf47632c609c59f527f9711ecd3214dccb0 (patch) | |
tree | b968abeb26d3a1539c91e33cdb2a0d8a45533308 /include/rdma | |
parent | 286e1d3f9ba89c7db5eecd30f47f9e333843ea13 (diff) | |
download | linux-779e0bf47632c609c59f527f9711ecd3214dccb0.tar.xz |
RDMA/core: Do not indicate device ready when device enablement fails
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: e7a5b4aafd82 ("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>
Diffstat (limited to 'include/rdma')
0 files changed, 0 insertions, 0 deletions