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-next>] [day] [month] [year] [list]
Message-Id: <20220524032847.3244853-1-zhanggenjian@kylinos.cn>
Date:   Tue, 24 May 2022 11:28:47 +0800
From:   Genjian Zhang <zhanggenjian123@...il.com>
To:     tsbogend@...ha.franken.de, maz@...nel.org, keescook@...omium.org,
        mark.rutland@....com, nathan@...nel.org, siyanteng01@...il.com,
        yyuasa@...ux.com, ralf@...ux-mips.org
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        huhai@...inos.cn, zhanggenjian123@...il.com,
        k2ci <kernel-bot@...inos.cn>
Subject: [PATCH v2] gpio: vr41xx: Use spurious_interrupt() and export it to modules

From: huhai <huhai@...inos.cn>

modpost complains once these drivers become modules.
  ERROR: modpost: "irq_err_count" [drivers/gpio/gpio-vr41xx.ko] undefined!

Fix it by use spurious_interrupt() and export spurious_interrupt() when
that symbol is =m.

Fixes: 27fdd325dace ("MIPS: Update VR41xx GPIO driver to use gpiolib")
Suggested-by: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Reported-by: k2ci <kernel-bot@...inos.cn>
Signed-off-by: huhai <huhai@...inos.cn>
---
 arch/mips/kernel/irq.c     | 3 +++
 drivers/gpio/gpio-vr41xx.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 5e11582fe308..69f9a46bf9e5 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -49,6 +49,9 @@ asmlinkage void spurious_interrupt(void)
 {
 	atomic_inc(&irq_err_count);
 }
+#ifdef CONFIG_GPIO_VR41XX_MODULE
+EXPORT_SYMBOL_GPL(spurious_interrupt);
+#endif
 
 void __init init_IRQ(void)
 {
diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
index 98cd715ccc33..8f27a0e0ad99 100644
--- a/drivers/gpio/gpio-vr41xx.c
+++ b/drivers/gpio/gpio-vr41xx.c
@@ -217,7 +217,7 @@ static int giu_get_irq(unsigned int irq)
 	printk(KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n",
 	       maskl, pendl, maskh, pendh);
 
-	atomic_inc(&irq_err_count);
+	spurious_interrupt();
 
 	return -EINVAL;
 }
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ