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]
Date:	Mon, 3 Nov 2014 08:56:57 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	mingo@...nel.org, linux-kernel@...r.kernel.org,
	peter@...leysoftware.com, rjw@...ysocki.net,
	torvalds@...ux-foundation.org, tglx@...utronix.de,
	eparis@...hat.com, umgwanakikbuti@...il.com, marcel@...tmann.org,
	ebiederm@...ssion.com, davem@...emloft.net, fengguang.wu@...el.com
Subject: Re: [PATCH 7/7] sched: Use WARN_ONCE for the might_sleep()
 TASK_RUNNING test

On Fri, Oct 31, 2014 at 11:42:37PM +0100, Oleg Nesterov wrote:
> On 10/31, Peter Zijlstra wrote:
> >
> > In some cases this can trigger a true flood of output.
> >
> > Requested-by: Ingo Molnar <mingo@...nel.org>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > ---
> >  kernel/sched/core.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -7301,7 +7301,7 @@ void __might_sleep(const char *file, int
> >  	 * since we will exit with TASK_RUNNING make sure we enter with it,
> >  	 * otherwise we will destroy state.
> >  	 */
> > -	if (WARN(current->state != TASK_RUNNING,
> > +	if (WARN_ONCE(current->state != TASK_RUNNING,
> 
> Agreed, but sorry for off-topic, can't resist.
> 
> Sometimes I hate WARN_ONCE() because you can't reproduce the problem
> once again without reboot.

Yes, and the fact that you can only see the first fail, even if more are
present.

> Perhaps WARN_ON_RATELIMIT() should be used more often (not sure about
> this particular case). Or, perhaps, we can add a special section for
> these "__warned" variables and add, say, sysctl which clears that
> section ?

Yeah, maybe, /debug/warn_once/file/line/enable or whatnot. For now I'll
continue removing ONCEs whenever I feel like it though ;-)
--
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