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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Feb 2009 21:20:59 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Randy Dunlap <randy.dunlap@...cle.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] module: fix build for CONFIG_SYSFS=n

On Thursday 19 February 2009 05:45:29 Ingo Molnar wrote:
> 
> * Randy Dunlap <randy.dunlap@...cle.com> wrote:
> 
> > > Is destroy_params() dependent on SYSFS? If yes then it would be 
> > 
> > Yes.
> > 
> > > far cleaner if there was a NOP destroy_params() inline for the 
> > > !SYSFS case.
...
> > From: Randy Dunlap <randy.dunlap@...cle.com>
> > 
> > Fix this build error when CONFIG_SYSFS=n:

Thanks for the find Randy.  I chose to put it in the header.  People who turn
off SYSFS probably appreciate a few bytes saved:

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -139,7 +139,14 @@ extern int parse_args(const char *name,
 		      int (*unknown)(char *param, char *val));
 
 /* Called by module remove. */
+#ifdef CONFIG_SYSFS
 extern void destroy_params(const struct kernel_param *params, unsigned num);
+#else
+static inline void destroy_params(const struct kernel_param *params,
+				  unsigned num)
+{
+}
+#endif /* !CONFIG_SYSFS */
 
 /* All the helper functions */
 /* The macros to do compile-time type checking stolen from Jakub

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ