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]
Date:   Thu, 2 Dec 2021 15:31:49 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Borislav Petkov <bp@...en8.de>
Cc:     X86 ML <x86@...nel.org>,
        Valentin Schneider <valentin.schneider@....com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] notifier: Return an error when a callback has already
 been registered

On 2021-12-02 15:23:36 [+0100], Borislav Petkov wrote:
> On Thu, Dec 02, 2021 at 03:16:30PM +0100, Sebastian Andrzej Siewior wrote:
> > >  	while ((*nl) != NULL) {
> > > -		if (unlikely((*nl) == n)) {
> > > -			WARN(1, "double register detected");
> > > -			return 0;
> > 
> > This could be s/0/-EEXIST/ or do I miss something?
> 
> It is...
…
> > > -		}
> > > +		if (unlikely((*nl) == n))
> > > +			return -EEXIST;
> 			^^^^^^^^^^^^^^^
> 
> ... right here.

I meant without the extra function. I'm fine either way, just curious :)

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ