* [PATCH v2] platform/x86: intel: punit_ipc: fix memory corruption
@ 2025-11-21 17:51 Dan Carpenter
2025-11-24 13:40 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-11-21 17:51 UTC (permalink / raw)
To: Qipeng Zha
Cc: Hans de Goede, Ilpo Järvinen, Darren Hart, Andy Shevchenko,
platform-driver-x86, linux-kernel, kernel-janitors
This passes the address of the pointer "&punit_ipcdev" when the intent
was to pass the pointer itself "punit_ipcdev" (without the ampersand).
This means that the:
complete(&ipcdev->cmd_complete);
in intel_punit_ioc() will write to a wrong memory address corrupting it.
Fixes: fdca4f16f57d ("platform:x86: add Intel P-Unit mailbox IPC driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v2: Correct and reword the commit message
drivers/platform/x86/intel/punit_ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel/punit_ipc.c b/drivers/platform/x86/intel/punit_ipc.c
index bafac8aa2baf..14513010daad 100644
--- a/drivers/platform/x86/intel/punit_ipc.c
+++ b/drivers/platform/x86/intel/punit_ipc.c
@@ -250,7 +250,7 @@ static int intel_punit_ipc_probe(struct platform_device *pdev)
} else {
ret = devm_request_irq(&pdev->dev, irq, intel_punit_ioc,
IRQF_NO_SUSPEND, "intel_punit_ipc",
- &punit_ipcdev);
+ punit_ipcdev);
if (ret) {
dev_err(&pdev->dev, "Failed to request irq: %d\n", irq);
return ret;
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] platform/x86: intel: punit_ipc: fix memory corruption
2025-11-21 17:51 [PATCH v2] platform/x86: intel: punit_ipc: fix memory corruption Dan Carpenter
@ 2025-11-24 13:40 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-11-24 13:40 UTC (permalink / raw)
To: Qipeng Zha, Dan Carpenter
Cc: Hans de Goede, Darren Hart, Andy Shevchenko, platform-driver-x86,
linux-kernel, kernel-janitors
On Fri, 21 Nov 2025 20:51:28 +0300, Dan Carpenter wrote:
> This passes the address of the pointer "&punit_ipcdev" when the intent
> was to pass the pointer itself "punit_ipcdev" (without the ampersand).
> This means that the:
>
> complete(&ipcdev->cmd_complete);
>
> in intel_punit_ioc() will write to a wrong memory address corrupting it.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: intel: punit_ipc: fix memory corruption
commit: 9b9c0adbc3f8a524d291baccc9d0c04097fb4869
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-24 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 17:51 [PATCH v2] platform/x86: intel: punit_ipc: fix memory corruption Dan Carpenter
2025-11-24 13:40 ` 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