From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21025331EC0; Sat, 12 Sep 2026 14:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789223156; cv=none; b=tngqRH/UVt29IFgrp6dJv8Bt3xWBVKk+x+tjH2HXXEVKUHx0GkDNFtvr6s/t2yfMZO2JanJ6fbtsziJgntsyUWyWyXC62fYzjKHvzOqbkOgLwVuB4/rRlElTf8m38NckqWjGj3ICvhHP1Ge3zGZs8OgeDcXyysanSfo1TebzoK4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789223156; c=relaxed/simple; bh=huvv8dX00hiY0ia36dGaz869I480BiUJYYOeqA4gvZc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tVcrfGzI2MUUcJSi0QD8ixUbuqu2S2iL9nR1mZPEX/ezJ28oKxOHHTmu/Cvf6vAqW6Ls1X9a4WbiRfFqv261vjE5T9iydRA7SVN0theO+IWdDPpojg64W/d6Z985qoumyz5guEbS77QNvzmuOGh116Ouzl6BTdMV10Fzp1Q3ugg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eKuiv6+O; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eKuiv6+O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F249D1F000FF; Sat, 12 Sep 2026 14:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789223154; bh=R6nSMHmCdAemC1cFwKRDbuAQlQ3TXF1josNT6Tkc4/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eKuiv6+OpBbyoIqrxSLIDPFkUyIL4/q3FMuBaTpg5MZO90iSUKBbujFc+4zvLqy3p nr8arGdUezgvS+/QAMNJ3jB8o+staUbs4xe39ZaCXxjSIJJdf0V+UkfpIldMnTr3ln T1YbmZX9bc/yS4Ciq5P5oZ6sNOKTQLnShFCdxklA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kalesh AP , Leon Romanovsky , Sasha Levin Subject: [PATCH 6.6 0733/1424] RDMA/hfi1: Initialize debugfs after probe completes Date: Sat, 12 Sep 2026 08:52:45 +0200 Message-ID: <20260912065623.713145118@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Leon Romanovsky [ Upstream commit bb18740b302f6f222ce3d5a7e5c45a52a90df805 ] Commit ed6f653fe430 ("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: ed6f653fe430 ("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 Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hfi1/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c index b0618e1b17ea8..5c7e34773f4ba 100644 --- a/drivers/infiniband/hw/hfi1/init.c +++ b/drivers/infiniband/hw/hfi1/init.c @@ -1638,11 +1638,8 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) * we still create devices, so diags, etc. can be used * to determine cause of problem. */ - 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); - } j = hfi1_device_create(dd); if (j) @@ -1675,6 +1672,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } sdma_start(dd); + hfi1_dbg_ibdev_init(&dd->verbs_dev); return 0; -- 2.53.0