From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751927AbbFYQZB (ORCPT ); Thu, 25 Jun 2015 12:25:01 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35355 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbbFYQZA (ORCPT ); Thu, 25 Jun 2015 12:25:00 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150624.063911.1220157256743743341.davem@davemloft.net> From: Paul Gortmaker Date: Thu, 25 Jun 2015 12:24:29 -0400 X-Google-Sender-Auth: it07oxn-Vvd16Sa_sooAm5Mm46E Message-ID: Subject: Re: [GIT] Networking To: Linus Torvalds Cc: David Miller , Doug Ledford , Ira Weiny , Andrew Morton , Network Development , Linux Kernel Mailing List 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, Jun 24, 2015 at 7:38 PM, Linus Torvalds wrote: [...] > > I'm getting *real* tired of that BUG_ON() shit. I realize that > infiniband is a niche market, and those "commercial grade" niche > markets are more-than-used-to crap code and horrible hacks, but this > is still the kernel. We don't add random machine-killing debug checks > when it is *so* simple to just do > > if (WARN_ON_ONCE(..)) > return -EINVAL; > > instead. > > Killing the machine for idiotic things like that is truly offensive, > and truly horrible horrible code. Why do I keep on having to tell > people off for doing these things? Why do people keep thinking that > debugging-by-killing-the-machine is a good idea? Ingo figured this was an educational battle that we'd never win. https://lkml.org/lkml/2014/5/21/490 I tend to agree, as unfortunate as that is. Paul. -- > > Either that BUG_ON() cannot possibly happen, in which case it should > damn well not exist in the first place. Or it's a valuable debug aid, > in which case it should damn well not be a BUG_ON. You can't have it > both ways. > > The next pointless BUG_ON() I see, I will start getting _really_ > unpleasant about. > > Doug, get rid of those things asap. > > Linus > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html