public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Devyn Liu <liudingyuan@huawei.com>,
	Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
	f.fangjian@huawei.com, linux-spi@vger.kernel.org
Subject: [PATCH AUTOSEL 6.7 09/23] spi: hisi-sfc-v3xx: Return IRQ_NONE if no interrupts were detected
Date: Fri,  2 Feb 2024 13:39:05 -0500	[thread overview]
Message-ID: <20240202183926.540467-9-sashal@kernel.org> (raw)
In-Reply-To: <20240202183926.540467-1-sashal@kernel.org>

From: Devyn Liu <liudingyuan@huawei.com>

[ Upstream commit de8b6e1c231a95abf95ad097b993d34b31458ec9 ]

Return IRQ_NONE from the interrupt handler when no interrupt was
detected. Because an empty interrupt will cause a null pointer error:

    Unable to handle kernel NULL pointer dereference at virtual
  address 0000000000000008
    Call trace:
        complete+0x54/0x100
        hisi_sfc_v3xx_isr+0x2c/0x40 [spi_hisi_sfc_v3xx]
        __handle_irq_event_percpu+0x64/0x1e0
        handle_irq_event+0x7c/0x1cc

Signed-off-by: Devyn Liu <liudingyuan@huawei.com>
Link: https://msgid.link/r/20240123071149.917678-1-liudingyuan@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-hisi-sfc-v3xx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/spi/spi-hisi-sfc-v3xx.c b/drivers/spi/spi-hisi-sfc-v3xx.c
index 9d22018f7985..1301d14483d4 100644
--- a/drivers/spi/spi-hisi-sfc-v3xx.c
+++ b/drivers/spi/spi-hisi-sfc-v3xx.c
@@ -377,6 +377,11 @@ static const struct spi_controller_mem_ops hisi_sfc_v3xx_mem_ops = {
 static irqreturn_t hisi_sfc_v3xx_isr(int irq, void *data)
 {
 	struct hisi_sfc_v3xx_host *host = data;
+	u32 reg;
+
+	reg = readl(host->regbase + HISI_SFC_V3XX_INT_STAT);
+	if (!reg)
+		return IRQ_NONE;
 
 	hisi_sfc_v3xx_disable_int(host);
 
-- 
2.43.0


  parent reply	other threads:[~2024-02-02 18:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 18:38 [PATCH AUTOSEL 6.7 01/23] wifi: cfg80211: fix missing interfaces when dumping Sasha Levin
2024-02-02 18:38 ` [PATCH AUTOSEL 6.7 02/23] wifi: mac80211: fix race condition on enabling fast-xmit Sasha Levin
2024-02-02 18:38 ` [PATCH AUTOSEL 6.7 03/23] fbdev: savage: Error out if pixclock equals zero Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 04/23] fbdev: sis: " Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 05/23] dpll: fix broken error path in dpll_pin_alloc(..) Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 06/23] platform/mellanox: mlxbf-tmfifo: Drop Tx network packet when Tx TmFIFO is full Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 07/23] spi: intel-pci: Add support for Arrow Lake SPI serial flash Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 08/23] x86/cpu: Add model number for Intel Clearwater Forest processor Sasha Levin
2024-02-02 18:39 ` Sasha Levin [this message]
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 10/23] block: Fix WARNING in _copy_from_iter Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 11/23] smb: Work around Clang __bdos() type confusion Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 12/23] cifs: cifs_pick_channel should try selecting active channels Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 13/23] cifs: translate network errors on send to -ECONNABORTED Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 14/23] cifs: helper function to check replayable error codes Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 15/23] ahci: asm1166: correct count of reported ports Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 16/23] aoe: avoid potential deadlock at set_capacity Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 17/23] spi: cs42l43: Handle error from devm_pm_runtime_enable Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 18/23] exec: Distinguish in_execve from in_exec Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 19/23] ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers Sasha Levin
2024-02-22 14:58   ` Niklas Cassel
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 20/23] ARM: dts: Fix TPM schema violations Sasha Levin
2024-02-02 19:20   ` Lukas Wunner
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 21/23] drm/amd/display: Disable ips before dc interrupt setting Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 22/23] MIPS: reserve exception vector space ONLY ONCE Sasha Levin
2024-02-02 18:39 ` [PATCH AUTOSEL 6.7 23/23] platform/x86: touchscreen_dmi: Add info for the TECLAST X16 Plus tablet Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240202183926.540467-9-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=broonie@kernel.org \
    --cc=f.fangjian@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=liudingyuan@huawei.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox