lkml.org 
[lkml]   [2017]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Support resetting WARN_ONCE for all architectures
Date
Hi Andi,

Thanks for making it work with the flag, but ...

Andi Kleen <andi@firstfloor.org> writes:
> diff --git a/lib/bug.c b/lib/bug.c
> index a6a1137d06db..7cb2d41845f7 100644
> --- a/lib/bug.c
> +++ b/lib/bug.c
> @@ -195,3 +195,24 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
>
> return BUG_TRAP_TYPE_BUG;
> }
> +
> +static void clear_once_table(struct bug_entry *start, struct bug_entry *end)
> +{
> + struct bug_entry *bug;
> +
> + for (bug = start; bug < end; bug++)
> + bug->flags &= ~BUGFLAG_ONCE;

Clearing BUGFLAG_ONCE removes the once-ness permanently. ie. it becomes
a WARN().

You should be clearing BUGFLAG_DONE, which is the flag that says this
WARN has already triggered.

cheers

\
 
 \ /
  Last update: 2017-11-03 10:38    [W:0.639 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site