FAILED: patch "[PATCH] platform/x86: intel: Move debugfs register before creating" failed to apply to 6.12-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x ad3bff944c0f4f2e913298a9664391af32f87491
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026052011-viewpoint-showoff-4451@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ad3bff944c0f4f2e913298a9664391af32f87491 Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <[email protected]>
Date: Thu, 30 Apr 2026 08:11:01 -0700
Subject: [PATCH] platform/x86: intel: Move debugfs register before creating
devices
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It is possible that the driver handling device is enumerated before registering debugfs. If the driver wants to access debugfs by calling tpmi_get_debugfs_dir(), this will return error in this case.
Hence register debugfs before creating devices.
drivers/platform/x86/intel/vsec_tpmi.c +6 -4
@@ -817,10 +817,6 @@ static int intel_vsec_tpmi_init(struct auxiliary_device *auxdev)auxiliary_set_drvdata (auxdev, tpmi_info); - ret =tpmi_create_devices (tpmi_info); -if (ret) -return ret; -/* * Allow debugfs when security policy allows. Everything this debugfs * interface provides, can also be done via /dev/mem access. If
@@ -830,6 +826,12 @@ static int intel_vsec_tpmi_init(struct auxiliary_device *auxdev)if (!security_locked_down (LOCKDOWN_DEV_MEM ) &&capable (CAP_SYS_RAWIO ))tpmi_dbgfs_register (tpmi_info); + ret =tpmi_create_devices (tpmi_info); +if (ret) { +debugfs_remove_recursive (tpmi_info->dbgfs_dir); +return ret; + } +return 0 ; }