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: <20210726110434.4b9f976d@oasis.local.home>
Date:   Mon, 26 Jul 2021 11:04:34 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Jason Wang <wangborong@...rlc.com>
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: use WARN_ONCE

On Mon, 26 Jul 2021 11:02:37 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> > @@ -1574,9 +1574,8 @@ __init static int init_events(void)
> >  
> >  		ret = register_trace_event(event);
> >  		if (!ret) {
> > -			printk(KERN_WARNING "event %d failed to register\n",
> > -			       event->type);
> > -			WARN_ON_ONCE(1);
> > +			WARN_ONCE(1, "event %d failed to register\n",
> > +				  event->type);
> >  		}
> >  	}
> >    
> 
> If you're going to change this, then nuke the conditional!
> 
> 	WARN_ONCE(!ret, "event %d failed to register\n", event->type);

Oh, and if you are making these types of changes, you need to
understand them. The string passed to WARN does not need the "\n" like
the printk() does.

	WARN_ONCE(!ret, "event %d failed to register", event->type);

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ