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]
Date:   Wed, 27 Jul 2022 11:21:09 +0200
From:   Laurent Dufour <ldufour@...ux.ibm.com>
To:     mpe@...erman.id.au
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        linux-next@...r.kernel.org, Sachin Sant <sachinp@...ux.ibm.com>
Subject: [PATCH] watchdog: Fix build error when CONFIG_SOFTLOCKUP_DETECTOR is not set

Sachin reported the following build error when CONFIG_SOFTLOCKUP_DETECTOR
is not set:

kernel/watchdog.c:597:20: error: static declaration of 'lockup_detector_reconfigure' follows non-static declaration
 static inline void lockup_detector_reconfigure(void)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/watchdog.c:17:
./include/linux/nmi.h:125:6: note: previous declaration of 'lockup_detector_reconfigure' was here
 void lockup_detector_reconfigure(void);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~

The definition of lockup_detector_reconfigure should be exported even in
that case, and __lockup_detector_reconfigure should remain static.

Fixes: 24a1260705b7 ("watchdog: export lockup_detector_reconfigure")
Reported-by: Sachin Sant <sachinp@...ux.ibm.com>
Signed-off-by: Laurent Dufour <ldufour@...ux.ibm.com>
---
 kernel/watchdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 90e6c41d5e33..41596c415111 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -590,7 +590,7 @@ static __init void lockup_detector_setup(void)
 }
 
 #else /* CONFIG_SOFTLOCKUP_DETECTOR */
-void __lockup_detector_reconfigure(void)
+static void __lockup_detector_reconfigure(void)
 {
 	cpus_read_lock();
 	watchdog_nmi_stop();
@@ -598,7 +598,7 @@ void __lockup_detector_reconfigure(void)
 	watchdog_nmi_start();
 	cpus_read_unlock();
 }
-static inline void lockup_detector_reconfigure(void)
+void lockup_detector_reconfigure(void)
 {
 	__lockup_detector_reconfigure();
 }
-- 
2.37.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ