[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzbYUTZ=oqZ2YgDjY0C2_n6ODhTfqj6V+m5xWmDxsuB0w@mail.gmail.com>
Date: Tue, 28 Feb 2017 10:37:15 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E. McKenney" <paulmck@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] locking fixes
On Mon, Feb 27, 2017 at 11:57 PM, Ingo Molnar <mingo@...nel.org> wrote:
>
> Note that the uninlining allowed us to enable the underflow/overflow warnings
> unconditionally and remove the debug Kconfig switch: this might trigger new
> warnings in buggy code and turn crashes/use-after-free bugs into less harmful
> memory leaks.
I'm ok with this, but that WARN() really needs to be a WARN_ON_ONCE().
Because once an underflow (or overflow) is happening, it tends to
_keep_ happening. And you may just have essentially DoS'ed the machine
that is now spending all its time writing those logs to disk.
Yes, yes, quiet independently of this we should limit WARN printouts
(and do the reverse: turn a "once" to mean "once in a blue moon"
rather than actually just once), but particularly for this kind of
"never happens" thing, it really is better to just warn once.
Linus
Powered by blists - more mailing lists