]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/dmaengine-at_xdmac-remove-bug_on-macro-in-tasklet.patch
drop rdma-cma-consider-scope_id-while-binding-to-ipv6-ll-.patch from 4.4, 4.9, and...
[thirdparty/kernel/stable-queue.git] / queue-4.4 / dmaengine-at_xdmac-remove-bug_on-macro-in-tasklet.patch
1 From 5fab0292dd849574f4383d04616dd3486cf9a59d Mon Sep 17 00:00:00 2001
2 From: Nicolas Ferre <nicolas.ferre@microchip.com>
3 Date: Wed, 3 Apr 2019 12:23:57 +0200
4 Subject: dmaengine: at_xdmac: remove BUG_ON macro in tasklet
5
6 [ Upstream commit e2c114c06da2d9ffad5b16690abf008d6696f689 ]
7
8 Even if this case shouldn't happen when controller is properly programmed,
9 it's still better to avoid dumping a kernel Oops for this.
10 As the sequence may happen only for debugging purposes, log the error and
11 just finish the tasklet call.
12
13 Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
14 Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
15 Signed-off-by: Vinod Koul <vkoul@kernel.org>
16 Signed-off-by: Sasha Levin <sashal@kernel.org>
17 ---
18 drivers/dma/at_xdmac.c | 6 +++++-
19 1 file changed, 5 insertions(+), 1 deletion(-)
20
21 diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
22 index af24c5bf32d69..8aa3ccf42e55a 100644
23 --- a/drivers/dma/at_xdmac.c
24 +++ b/drivers/dma/at_xdmac.c
25 @@ -1608,7 +1608,11 @@ static void at_xdmac_tasklet(unsigned long data)
26 struct at_xdmac_desc,
27 xfer_node);
28 dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
29 - BUG_ON(!desc->active_xfer);
30 + if (!desc->active_xfer) {
31 + dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting");
32 + spin_unlock_bh(&atchan->lock);
33 + return;
34 + }
35
36 txd = &desc->tx_dma_desc;
37
38 --
39 2.20.1
40