Skip to content
Snippets Groups Projects
Commit 733594e9 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by 谢秀奇
Browse files

dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler()


[ Upstream commit 39c71a5b ]

In stm32_mdma_irq_handler(), chan is checked on line 1368.
When chan is NULL, it is still used on line 1369:
    dev_err(chan2dev(chan), "MDMA channel not initialized\n");

Thus, a possible null-pointer dereference may occur.

To fix this bug, "dev_dbg(mdma2dev(dmadev), ...)" is used instead.

Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Fixes: a4ffb13c ("dmaengine: Add STM32 MDMA driver")
Link: https://lore.kernel.org/r/20190729020849.17971-1-baijiaju1990@gmail.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent cc2df9cb
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment