]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/x86: ISST: Add missing write block check
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 7 Jan 2026 06:02:55 +0000 (22:02 -0800)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 13 Jan 2026 14:31:28 +0000 (16:31 +0200)
If writes are blocked, then return error during SST-CP enable command.
Add missing write block check in this code path.

Fixes: 8bed9ff7dbcc ("platform/x86: ISST: Process read/write blocked feature status")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260107060256.1634188-2-srinivas.pandruvada@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c

index 34bff2f65a835b35e2ed7b9db2face85b242dd8b..f587709ddd473ca6d0b3e44a2b97795489318da7 100644 (file)
@@ -612,6 +612,9 @@ static long isst_if_core_power_state(void __user *argp)
                return -EINVAL;
 
        if (core_power.get_set) {
+               if (power_domain_info->write_blocked)
+                       return -EPERM;
+
                _write_cp_info("cp_enable", core_power.enable, SST_CP_CONTROL_OFFSET,
                               SST_CP_ENABLE_START, SST_CP_ENABLE_WIDTH, SST_MUL_FACTOR_NONE)
                _write_cp_info("cp_prio_type", core_power.priority_type, SST_CP_CONTROL_OFFSET,