From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751093AbdCAGXx (ORCPT ); Wed, 1 Mar 2017 01:23:53 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:33274 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbdCAGXu (ORCPT ); Wed, 1 Mar 2017 01:23:50 -0500 MIME-Version: 1.0 In-Reply-To: <20170228075747.GA10419@gmail.com> References: <20170228075747.GA10419@gmail.com> From: Linus Torvalds Date: Tue, 28 Feb 2017 10:37:15 -0800 X-Google-Sender-Auth: RXZ3JbfmiJsis89BYoZ8MB-BT4k Message-ID: Subject: Re: [GIT PULL] locking fixes To: Ingo Molnar Cc: Linux Kernel Mailing List , Peter Zijlstra , Thomas Gleixner , "Paul E. McKenney" , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 27, 2017 at 11:57 PM, Ingo Molnar 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