platform/x86: intel: punit_ipc: fix memory corruption
Subsystems (3)
PATCH v2 1/1 platform/x86: intel: punit_ipc: fix memory corruption
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.
---
v2: Correct and reword the commit message
drivers/platform/x86/intel/punit_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/punit_ipc.c +1 -1
@@ -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;
Signature · 1 line
2.51.0
Ilpo Järvinen
maintainerQuoted 9 lines · Dan Carpenter
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.