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] [day] [month] [year] [list]
Message-Id: <20140510121606.4270642bc3119f3e5a08b300@skynet.be>
Date:	Sat, 10 May 2014 12:16:06 +0200
From:	Fabian Frederick <fabf@...net.be>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH 1/1] KERNEL: add __attribute__  in c file

On Wed, 7 May 2014 15:25:57 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Wed, 7 May 2014 22:33:39 +0200 Fabian Frederick <fabf@...net.be> wrote:
> 
> > This patch fixes a sparse warning about noreturn attribute only
> > featuring in module.h
> > 
> > kernel/module.c:212:6: error: symbol '__module_put_and_exit' redeclared with
> > different type (originally declared at include/linux/module.h:449)-
> > different modifiers
> > 
> > ...
> >
> > --- a/include/linux/module.h
> > +++ b/include/linux/module.h
> > @@ -446,8 +446,8 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
> >  					     struct module *, unsigned long),
> >  				   void *data);
> >  
> > -extern void __module_put_and_exit(struct module *mod, long code)
> > -	__attribute__((noreturn));
> > +extern void __attribute__((noreturn)) __module_put_and_exit(struct module *mod,
> > +							    long code);
> >  #define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code)
> >  
> >  #ifdef CONFIG_MODULE_UNLOAD
> > diff --git a/kernel/module.c b/kernel/module.c
> > index 079c461..7d78872 100644
> > --- a/kernel/module.c
> > +++ b/kernel/module.c
> > @@ -209,7 +209,8 @@ static inline void add_taint_module(struct module *mod, unsigned flag,
> >   * A thread that wants to hold a reference to a module only while it
> >   * is running can call this to safely exit.  nfsd and lockd use this.
> >   */
> > -void __module_put_and_exit(struct module *mod, long code)
> > +void __attribute__((noreturn)) __module_put_and_exit(struct module *mod,
> > +						     long code)
> >  {
> 
> Can we use __noreturn here?
Well it works(compilation/no more sparse warning) but after looking at some documentation, it looks more like some sparse false positive.

Fabian
--
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