lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201110040553.1381-3-frank@allwinnertech.com>
Date:   Tue, 10 Nov 2020 12:05:36 +0800
From:   Frank Lee <frank@...winnertech.com>
To:     vkoul@...nel.org, robh+dt@...nel.org, mripard@...nel.org,
        wens@...e.org, ulf.hansson@...aro.org, kishon@...com,
        wim@...ux-watchdog.org, linux@...ck-us.net,
        dan.j.williams@...el.com, linus.walleij@...aro.org,
        wsa+renesas@...g-engineering.com, dianders@...omium.org,
        marex@...x.de, colin.king@...onical.com, rdunlap@...radead.org,
        krzk@...nel.org, gregkh@...uxfoundation.org, megous@...ous.com,
        rikard.falkeborn@...il.com, dmaengine@...r.kernel.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
        linux-watchdog@...r.kernel.org, linux-gpio@...r.kernel.org,
        tiny.windzz@...il.com
Cc:     Yangtao Li <frank@...winnertech.com>
Subject: [PATCH 02/19] pinctrl: sunxi: Mark the irq bank not found in sunxi_pinctrl_irq_handler() with WARN_ON

From: Yangtao Li <frank@...winnertech.com>

The interrupt descriptor cannot be found in the interrupt processing
function, and this situation cannot happen when the system is running
normally. It doesn't seem right to return directly to the status of not
handling gic. In this case, it must be a bug, let's mark it with
BUG_ON.

Signed-off-by: Yangtao Li <frank@...winnertech.com>
---
 drivers/pinctrl/sunxi/pinctrl-sunxi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index 8e792f8e2dc9..9d8b59dafa4b 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -1139,8 +1139,7 @@ static void sunxi_pinctrl_irq_handler(struct irq_desc *desc)
 		if (irq == pctl->irq[bank])
 			break;
 
-	if (bank == pctl->desc->irq_banks)
-		return;
+	WARN_ON(bank == pctl->desc->irq_banks);
 
 	reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank);
 	val = readl(pctl->membase + reg);
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ