Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2253580ybv; Mon, 24 Feb 2020 02:01:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxWOUXSFomYm03sPtlfv8a8DBVacoxOEVmiuMDXlrQwr//A5TOBlgMSoQSet+YsRXEcAflP X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr37300657otr.167.1582538503382; Mon, 24 Feb 2020 02:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582538503; cv=none; d=google.com; s=arc-20160816; b=E/gU2u8ZoIgn/nPkF1Y7L0ONXQyX7A40LADIS9yfnT3Lh2NG51/etoCF3CmmzV2c/i DfAGQZXE1Wd15F0E91BMlLOJK7Ib5OKGtWstp57ZAM/xPmuq85qPJj5fOaDv48lKrbiy +3SbpoCMrNXt4W3vmBSN/MS8rJ6XiFO1/7JSmlnn6UeBU2u61taFGONIZ79iDkCQNmct VGrQv3sJfh/cjjx03OuDYIX3Mbf9uD18G/8HWx2DQ+S5M21kq/9W08Ismf7YhI5EPxcO sHr6eY/kNkyRImmcY8IWyfTEPUbp9L5yhi4tG4lazjsavQ6/EpNR78eIKxSe6EONYAsV jqQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=xH/4bfRiAQSsYGbm2WsnrGFLe85wgXomw2HN69oKdU4=; b=Yde3NGBabKIKyJN9sz7AxF0MZQqVL0jrySWLvRp+OEMPci5mvSMq44R7TRtnMiuQ8m 0k9Tv1pUbUuWx2y9tpg5EtTZnTDro8wmAycMoGG6ZwVNp0Xu9Q+xBTxlDwDjJTGCzGjB VFNC0j4kDaFOJI+GEyRiSB7QJC/ocvG1SeCMbiXDbNUpceVDQACDwEkjiFjpPOYfWLfG j/j6VrryDfnT3EUh5WjxQ4wm1JXkQEBKfsgnC1EeKqEKZp1EbW9m2MIXP0MWspBnKBlB erfNeH26O9pNHRVEXOSzcMUNhVxVD7PxKAAlRyfsnDhAB0IqXCsFrS0wmCIiCTPPDIn4 4vTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f141si4773676oib.125.2020.02.24.02.01.31; Mon, 24 Feb 2020 02:01:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbgBXKBW (ORCPT + 99 others); Mon, 24 Feb 2020 05:01:22 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:37244 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbgBXKBW (ORCPT ); Mon, 24 Feb 2020 05:01:22 -0500 Received: by mail-oi1-f196.google.com with SMTP id q84so8405608oic.4; Mon, 24 Feb 2020 02:01:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xH/4bfRiAQSsYGbm2WsnrGFLe85wgXomw2HN69oKdU4=; b=E7SfETV+bcvhUeBbnhT8sFa1bzi7tfwWxqE5ckEcPbZPtYRVLZj/jGcVf0M4kBvSes rWQidJkhSjPL0WpiQ6ABGMRhrPQ8tk3tVTHcnT6iPHtYI/0gnIvgmu64zBJOXOReJuyJ d7exmLg+Kbr1qbFawEk+/i7tGWzPZj8TH0J7eTp5HwTEWbRMlFa0BvXmXyRvdcKoGtxV oalOhofklmUVOVIMejt2+gMznd9bFv+nUVNF0z1wtg10VqJ43VZmscdFe2aNSRXEIhVi wMxFEbiCKPBeiivpLH9DcsBcJ82/LtzSNw6I4SHaHzVyj1UpQk14ASakwb3+QDDojoMJ Dp4w== X-Gm-Message-State: APjAAAUsHxKedjXK5PLVux4itqt5tqxh0mhmHDBo9vGpL7jmNtNqQNZM 9xE44S899wNEaw7y4XBsc34j36WXL41q8SXjxFo= X-Received: by 2002:aca:b4c3:: with SMTP id d186mr11610969oif.131.1582538480986; Mon, 24 Feb 2020 02:01:20 -0800 (PST) MIME-Version: 1.0 References: <20150624.063911.1220157256743743341.davem@davemloft.net> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 24 Feb 2020 11:01:09 +0100 Message-ID: Subject: Re: [GIT] Networking To: Linus Torvalds Cc: David Miller , Doug Ledford , Ira Weiny , Andrew Morton , Network Development , Linux Kernel Mailing List , Greg KH Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Thu, Jun 25, 2015 at 1:38 AM Linus Torvalds wrote: > On Wed, Jun 24, 2015 at 6:39 AM, David Miller wrote: > > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master > > On the *other* side of the same conflict, I find an even more > offensive commit, namely commit 4cd7c9479aff ("IB/mad: Add support for > additional MAD info to/from drivers") which adds a BUG_ON() for a > sanity check, rather than just returning -EINVAL or something sane > like that. > > 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. And if we follow that advice, friendly Greg will respond with: "We really do not want WARN_ON() anywhere, as that causes systems with panic-on-warn to reboot." https://lore.kernel.org/lkml/20191121135743.GA552517@kroah.com/ > 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? > > 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. Agreed. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds