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:   Thu, 29 Jun 2023 16:10:44 +0000
From:   Matteo Rizzo <matteorizzo@...gle.com>
To:     jarkko@...nel.org, mcgrof@...nel.org, linux-kernel@...r.kernel.org
Cc:     Matteo Rizzo <matteorizzo@...gle.com>
Subject: [PATCH] umh: fix build warning with CONFIG_SYSCTL disabled

When CONFIG_SYSCTL is not defined proc_cap_handler is not used. This
causes a build warning with -Wunused-function.

kernel/umh.c:497:12: error: unused function 'proc_cap_handler'
[-Werror,-Wunused-function]
static int proc_cap_handler(struct ctl_table *table, int write,
           ^
1 error generated.

Fixes: 861dc0b46432 ("sysctl: move umh sysctl registration to its own file")
Signed-off-by: Matteo Rizzo <matteorizzo@...gle.com>
---
 kernel/umh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/umh.c b/kernel/umh.c
index 41088c5c39fd..1b13c5d34624 100644
--- a/kernel/umh.c
+++ b/kernel/umh.c
@@ -494,6 +494,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
 }
 EXPORT_SYMBOL(call_usermodehelper);
 
+#if defined(CONFIG_SYSCTL)
 static int proc_cap_handler(struct ctl_table *table, int write,
 			 void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -544,7 +545,6 @@ static int proc_cap_handler(struct ctl_table *table, int write,
 	return 0;
 }
 
-#if defined(CONFIG_SYSCTL)
 static struct ctl_table usermodehelper_table[] = {
 	{
 		.procname	= "bset",
-- 
2.41.0.162.gfafddb0af9-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ