From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756108AbcJGF7Q (ORCPT ); Fri, 7 Oct 2016 01:59:16 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:46151 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbcJGF7J (ORCPT ); Fri, 7 Oct 2016 01:59:09 -0400 Date: Fri, 7 Oct 2016 07:48:24 +0200 From: Willy Tarreau To: Linus Torvalds Cc: Kees Cook , Paul Gortmaker , Johannes Weiner , Andrew Morton , Antonio SJ Musumeci , Miklos Szeredi , Linux Kernel Mailing List , stable Subject: Re: BUG_ON() in workingset_node_shadows_dec() triggers Message-ID: <20161007054824.GA9917@1wt.eu> References: <20161005190604.GA8116@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 06, 2016 at 04:59:20PM -0700, Linus Torvalds wrote: > We should just switch BUG() over and be done with it. The whole point > it that since it should never trigger in the first place, the > semantics on BUG() should never matter. > > And if you have some code that depends on the semantics of BUG(), that > code is buggy crap *by*definition*. I totally agree with this. If a developer writes BUG() somewhere, it means he doesn't see how it is possible to end up in this situation. Thus we cannot hope that the BUG() call is doing anything right to fix what the code author didn't expect to happen. It just means "try to limit the risks but I don't really know which ones". Also we won't make things worse. Where people currently have an oops, they'll get one or more warnings. The side effects (lockups, panic, etc) will more or less be the same, but many of us already don't want to continue after an oops and despite this our systems work fine, so I don't see why anyone would suffer from such a change. However some developers may get more details about issues than what they could get in the past. Willy