* [PATCH v1] platform/x86: ISST: Propagate def_ioctl errors to user space
@ 2026-11-16 21:02 Kuppuswamy Sathyanarayanan
2026-11-19 14:42 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Kuppuswamy Sathyanarayanan @ 2026-11-16 21:02 UTC (permalink / raw)
To: Srinivas Pandruvada, Hans de Goede, Ilpo Järvinen
Cc: Piotr Kubaj, platform-driver-x86, linux-kernel
isst_if_def_ioctl() declares an inner "int ret" that shadows the outer
"long ret". When the TPMI def_ioctl callback fails, its error is lost
and user space always sees -ENOTTY.
Remove the inner variable. Return the callback result unless it is
-ENOTTY.
Fixes: 33c16dc1a2d1 ("platform/x86: ISST: Add IOCTL default callback")
Reported-by: Piotr Kubaj <piotr.kubaj@intel.com>
Co-developed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
---
.../platform/x86/intel/speed_select_if/isst_if_common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
index 4c04f0bc9b47..fecb908bc88c 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_if_common.c
@@ -614,12 +614,12 @@ static long isst_if_def_ioctl(struct file *file, unsigned int cmd,
default:
for (i = 0; i < ISST_IF_DEV_MAX; ++i) {
struct isst_if_cmd_cb *cb = &punit_callbacks[i];
- int ret;
if (cb->def_ioctl) {
- ret = cb->def_ioctl(file, cmd, arg);
- if (!ret)
- return ret;
+ long def_ret = cb->def_ioctl(file, cmd, arg);
+
+ if (def_ret != -ENOTTY)
+ return def_ret;
}
}
break;
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] platform/x86: ISST: Propagate def_ioctl errors to user space
2026-11-16 21:02 [PATCH v1] platform/x86: ISST: Propagate def_ioctl errors to user space Kuppuswamy Sathyanarayanan
@ 2026-11-19 14:42 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-11-19 14:42 UTC (permalink / raw)
To: Srinivas Pandruvada, Hans de Goede, Kuppuswamy Sathyanarayanan
Cc: Piotr Kubaj, platform-driver-x86, linux-kernel
On Mon, 16 Nov 2026 13:02:09 -0800, Kuppuswamy Sathyanarayanan wrote:
> isst_if_def_ioctl() declares an inner "int ret" that shadows the outer
> "long ret". When the TPMI def_ioctl callback fails, its error is lost
> and user space always sees -ENOTTY.
>
> Remove the inner variable. Return the callback result unless it is
> -ENOTTY.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/1] platform/x86: ISST: Propagate def_ioctl errors to user space
commit: 74a0cee01b1ce34a09f6fc4531418b185c88d161
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-19 14:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16 21:02 [PATCH v1] platform/x86: ISST: Propagate def_ioctl errors to user space Kuppuswamy Sathyanarayanan
2026-11-19 14:42 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®