All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.9 01/19] soc: fsl: qbman: avoid race in clearing QMan interrupt
@ 2019-02-28 15:14 ` Sasha Levin
  0 siblings, 0 replies; 27+ messages in thread
From: Sasha Levin @ 2019-02-28 15:14 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Madalin Bucur, Roy Pledge, Li Yang, Sasha Levin, linuxppc-dev,
	linux-arm-kernel

From: Madalin Bucur <madalin.bucur@nxp.com>

[ Upstream commit 89857a8a5c89a406b967ab2be7bd2ccdbe75e73d ]

By clearing all interrupt sources, not only those that
already occurred, the existing code may acknowledge by
mistake interrupts that occurred after the code checks
for them.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soc/fsl/qbman/qman.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 2cc82ed6433a0..91f5c951850f7 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -1073,18 +1073,19 @@ static void qm_mr_process_task(struct work_struct *work);
 static irqreturn_t portal_isr(int irq, void *ptr)
 {
 	struct qman_portal *p = ptr;
-
-	u32 clear = QM_DQAVAIL_MASK | p->irq_sources;
 	u32 is = qm_in(&p->p, QM_REG_ISR) & p->irq_sources;
+	u32 clear = 0;
 
 	if (unlikely(!is))
 		return IRQ_NONE;
 
 	/* DQRR-handling if it's interrupt-driven */
-	if (is & QM_PIRQ_DQRI)
+	if (is & QM_PIRQ_DQRI) {
 		__poll_portal_fast(p, QMAN_POLL_LIMIT);
+		clear = QM_DQAVAIL_MASK | QM_PIRQ_DQRI;
+	}
 	/* Handling of anything else that's interrupt-driven */
-	clear |= __poll_portal_slow(p, is);
+	clear |= __poll_portal_slow(p, is) & QM_PIRQ_SLOW;
 	qm_out(&p->p, QM_REG_ISR, clear);
 	return IRQ_HANDLED;
 }
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2019-02-28 15:20 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 15:14 [PATCH AUTOSEL 4.9 01/19] soc: fsl: qbman: avoid race in clearing QMan interrupt Sasha Levin
2019-02-28 15:14 ` Sasha Levin
2019-02-28 15:14 ` Sasha Levin
2019-02-28 15:14 ` [PATCH AUTOSEL 4.9 02/19] ARM: pxa: ssp: unneeded to free devm_ allocated data Sasha Levin
2019-02-28 15:14 ` [PATCH AUTOSEL 4.9 03/19] arm64: dts: add msm8996 compatible to gicv3 Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 04/19] usb: phy: fix link errors Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 05/19] irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 06/19] drm/sun4i: tcon: Prepare and enable TCON channel 0 clock at init Sasha Levin
2019-02-28 15:15   ` Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 07/19] dmaengine: at_xdmac: Fix wrongfull report of a channel as in use Sasha Levin
2019-02-28 15:15   ` Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 08/19] vsock/virtio: fix kernel panic after device hot-unplug Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 09/19] vsock/virtio: reset connected sockets on device removal Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 10/19] dmaengine: dmatest: Abort test in case of mapping error Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 11/19] selftests: netfilter: fix config fragment CONFIG_NF_TABLES_INET Sasha Levin
2019-02-28 15:15   ` Sasha Levin
2019-02-28 15:15   ` sashal
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 12/19] selftests: netfilter: add simple masq/redirect test cases Sasha Levin
2019-02-28 15:15   ` Sasha Levin
2019-02-28 15:15   ` sashal
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 13/19] netfilter: nf_nat: skip nat clash resolution for same-origin entries Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 14/19] s390/qeth: fix use-after-free in error path Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 15/19] perf symbols: Filter out hidden symbols from labels Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 16/19] perf trace: Support multiple "vfs_getname" probes Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 17/19] MIPS: Loongson: Introduce and use loongson_llsc_mb() Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 18/19] MIPS: Remove function size check in get_frame_info() Sasha Levin
2019-02-28 15:15 ` [PATCH AUTOSEL 4.9 19/19] fs: ratelimit __find_get_block_slow() failure message Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.