mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
RDMA/hfi1: Initialize debugfs after probe completes
Commited6f653fe4("staging/rdma/hfi1: Fix debugfs access race") moved debugfs creation after device initialization and IB registration so users cannot access the files before the driver is ready. However, init_one() still creates them before character device creation and SDMA startup finish. Move hfi1_dbg_ibdev_init() to the end of the successful probe path, matching hfi1_dbg_ibdev_exit() as the first action in remove_one(). Fixes:ed6f653fe4("staging/rdma/hfi1: Fix debugfs access race") Link: https://patch.msgid.link/20260708-clean-init-one-hfi1-v1-12-b9e9641268a5@nvidia.com Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
This commit is contained in:
parent
9bab31776a
commit
bb18740b30
|
|
@ -1635,11 +1635,8 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
* Now ready for use. this should be cleared whenever we
|
||||
* detect a reset, or initiate one.
|
||||
*/
|
||||
if (!initfail && !ret) {
|
||||
if (!initfail && !ret)
|
||||
dd->flags |= HFI1_INITTED;
|
||||
/* create debufs files after init and ib register */
|
||||
hfi1_dbg_ibdev_init(&dd->verbs_dev);
|
||||
}
|
||||
|
||||
if (initfail || ret) {
|
||||
msix_clean_up_interrupts(dd);
|
||||
|
|
@ -1665,6 +1662,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
ERR_PTR(ret));
|
||||
|
||||
sdma_start(dd);
|
||||
hfi1_dbg_ibdev_init(&dd->verbs_dev);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user