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: <20070918201526.GB5279@devil>
Date:	Tue, 18 Sep 2007 22:15:26 +0200
From:	Andreas Herrmann <aherrman@...or.de>
To:	roel <12o3l@...cali.nl>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Eric Van Hensbergen <ericvh@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] 9p: fix compile error if !CONFIG_SYSCTL

On Tue, Sep 18, 2007 at 08:53:19PM +0200, roel wrote:
> Andreas Herrmann wrote:
> > Fix compile error if !CONFIG_SYSCTL:
> > 
> >     ...
> >   LD      .tmp_vmlinux1
> > net/built-in.o: In function `init_p9':
> > net/9p/mod.c:59: undefined reference to `p9_sysctl_register'
> > net/built-in.o: In function `exit_p9':
> > net/9p/mod.c:75: undefined reference to `p9_sysctl_unregister'
> > make: *** [.tmp_vmlinux1] Error 1
> >     ...
> >  
> isn't it nicer to do something like this instead?

No.

> diff --git a/net/9p/sysctl.c b/net/9p/sysctl.c
> index 8b61027..e199865 100644
> --- a/net/9p/sysctl.c
> +++ b/net/9p/sysctl.c
> @@ -68,14 +68,17 @@ static struct ctl_table_header *p9_table_header;
>  
>  int __init p9_sysctl_register(void)
>  {
> +#ifdef CONFIG_SYSCTL
>  	p9_table_header = register_sysctl_table(p9_ctl_table);
>  	if (!p9_table_header)
>  		return -ENOMEM;
> -
> +#endif
>  	return 0;
>  }
>  
>  void __exit p9_sysctl_unregister(void)
>  {
> +#ifdef CONFIG_SYSCTL
>  	 unregister_sysctl_table(p9_table_header);
> +#endif
>  }

The problem is not that (un)register_sysctl_table were not defined
if !CONFIG_SYSCTL. There are stubs in kernel/sysctl.c for this case.
I.e. your patch is superfluous.

The point is, 9p/sysctl.c is compiled iff CONFIG_SYSCTL is set.
See net/9p/Makefile ...


Regards,

Andreas

-
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