summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorbui duc phuc <phucduc.bui@gmail.com>2026-07-16 12:27:58 +0700
committerVinod Koul <vkoul@kernel.org>2026-07-17 17:56:45 +0530
commitdc8a5238e1c7db74a7b4f02bcf0b05559b6627c5 (patch)
treeab3b2d6176a2e17c5c9084aed3e6947290a7bb9b /include/linux
parent30cb1b9fd4295f54d22b3a15ecf8525c9fe03ebe (diff)
dmaengine: validate dev and name in dma_request_chan()
dma_request_chan() assumes both @dev and @name are valid, but neither is checked before use. dev is dereferenced immediately via dev_fwnode(), which accesses dev->of_node or dev->fwnode without checking for NULL. Likewise, if name is NULL and the OF/ACPI lookup does not succeed, the legacy filter-map path eventually passes it to strcmp(), resulting in a NULL pointer dereference. These are caller bugs rather than normal lookup failures, so add a WARN_ON() at function entry to catch invalid arguments early during development instead of crashing later. No functional change for valid callers. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260716052758.23465-1-phucduc.bui@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions