[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220814152437.2374207-44-sashal@kernel.org>
Date: Sun, 14 Aug 2022 11:24:17 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Ben Dooks <ben.dooks@...ive.com>, Vinod Koul <vkoul@...nel.org>,
Sasha Levin <sashal@...nel.org>, Eugeniy.Paltsev@...opsys.com,
dmaengine@...r.kernel.org
Subject: [PATCH AUTOSEL 5.19 44/64] dmaengine: dw-axi-dmac: do not print NULL LLI during error
From: Ben Dooks <ben.dooks@...ive.com>
[ Upstream commit 86cb0defe0e275453bc39e856bb523eb425a6537 ]
During debugging we have seen an issue where axi_chan_dump_lli()
is passed a NULL LLI pointer which ends up causing an OOPS due
to trying to get fields from it. Simply print NULL LLI and exit
to avoid this.
Signed-off-by: Ben Dooks <ben.dooks@...ive.com>
Link: https://lore.kernel.org/r/20220708170153.269991-3-ben.dooks@sifive.com
Signed-off-by: Vinod Koul <vkoul@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index c741da02b67e..41583f01a360 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -982,6 +982,11 @@ static int dw_axi_dma_chan_slave_config(struct dma_chan *dchan,
static void axi_chan_dump_lli(struct axi_dma_chan *chan,
struct axi_dma_hw_desc *desc)
{
+ if (!desc->lli) {
+ dev_err(dchan2dev(&chan->vc.chan), "NULL LLI\n");
+ return;
+ }
+
dev_err(dchan2dev(&chan->vc.chan),
"SAR: 0x%llx DAR: 0x%llx LLP: 0x%llx BTS 0x%x CTL: 0x%x:%08x",
le64_to_cpu(desc->lli->sar),
--
2.35.1
Powered by blists - more mailing lists