]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: sprd: Add validation of current descriptor in irq handler
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 6 May 2019 07:28:29 +0000 (15:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:34:48 +0000 (11:34 +0800)
commit36090046e762aa70c118b501bdf2b3aa79c112d5
tree8a2e5f41efa5652c2e49e7a8bfe6616a43bf6f5a
parentaf410491e083806859c7d43f5d2ddf6eef947942
dmaengine: sprd: Add validation of current descriptor in irq handler

[ Upstream commit 58152b0e573e5581c4b9ef7cf06d2e9fafae27d4 ]

When user terminates one DMA channel to free all its descriptors, but
at the same time one transaction interrupt was triggered possibly, now
we should not handle this interrupt by validating if the 'schan->cur_desc'
was set as NULL to avoid crashing the kernel.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/sprd-dma.c