From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932211AbcJETSz (ORCPT ); Wed, 5 Oct 2016 15:18:55 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:34162 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754509AbcJETSx (ORCPT ); Wed, 5 Oct 2016 15:18:53 -0400 MIME-Version: 1.0 In-Reply-To: <20161005190604.GA8116@1wt.eu> References: <20161005054407.GC7297@1wt.eu> <20161005190604.GA8116@1wt.eu> From: Linus Torvalds Date: Wed, 5 Oct 2016 12:18:51 -0700 X-Google-Sender-Auth: etv9QZS1CyuAyR-mIv_UQWXjB9c Message-ID: Subject: Re: BUG_ON() in workingset_node_shadows_dec() triggers To: Willy Tarreau Cc: Paul Gortmaker , Johannes Weiner , Andrew Morton , Antonio SJ Musumeci , Miklos Szeredi , Linux Kernel Mailing List , stable 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 Wed, Oct 5, 2016 at 12:06 PM, Willy Tarreau wrote: > > I have the same doubts, so at least I would not want to run the "sed" > immediately, at least to keep the initial intent. But I think everyone > is right in is own yard when he puts a BUG_ON() when he doesn't know > how to handle an unsafe situation, he's wrong from a global perspective. Yes. And as you say, even when the developer might be right in sone situations, you'd easily still be wrong for the same code in some other situation. Quite frankly, I wouldn't do a sed-script pass to actually change existing users. I'd just change how the BUG() implementation itself works. Not make it a direct WARN_ON(), but perhaps something like - use WARN_ON() with a global rate limiter (we do *not* want BUG cascades, but re-enable the warning after a few minutes) - have some kernel command line option for the server people to allow them to just force a reboot for it Hmm? Anybody want to play with it? Linus