[PATCH 5.10] dmaengine: dw-edma-pcie: Reject devices without driver data
From: Roman Demidov
Date: Tue Sep 15 2026 - 08:56:52 EST
From: Koichiro Den <den@xxxxxxxxxxxxx>
commit 11d7cfe0c119691b2dafbb699bbca90258c678aa upstream.
dw_edma_pcie_probe() treats the PCI device ID driver_data as the
template for the controller layout and copies it unconditionally. A
device bound dynamically via sysfs can match the driver without that
data, which leads to a NULL pointer dereference.
Reject such matches before enabling the device.
Fixes: 41aaff2a2ac0 ("dmaengine: Add Synopsys eDMA IP PCIe glue-logic")
Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Link: https://patch.msgid.link/20260521142153.2957432-3-den@xxxxxxxxxxxxx
Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
Signed-off-by: Roman Demidov <roman.demidov.nn@xxxxxxxxx>
---
Backport fix for CVE-2026-72147
drivers/dma/dw-edma/dw-edma-pcie.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
index 987ede1087dd..95d60feca391 100644
--- a/drivers/dma/dw-edma/dw-edma-pcie.c
+++ b/drivers/dma/dw-edma/dw-edma-pcie.c
@@ -104,6 +104,9 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
struct dw_edma *dw;
int i, mask;
+ if (!pdata)
+ return -ENODEV;
+
/* Enable PCI device */
err = pcim_enable_device(pdev);
if (err) {
--
2.53.0