From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B0A6C11D2F for ; Mon, 24 Feb 2020 12:47:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0234C2072D for ; Mon, 24 Feb 2020 12:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582548460; bh=RFoS0XwskBiZFNVHWB51s86/gyyO1NSdhT0NCh46r0k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=fClhSzlbVgg8S0c4RFH3FdESwKtXF/b0d9CI7sVn6yGJ3+IpYZ3iMnTqAnzgO+Tej spW0zMynJrorm49D/kLO0b6SPUDh2WR/NaQWzf2uESteu2e9tAEcjSR8Wm8kEJeTKl FcnOTDJUl9HKBnFXHFi2WcuSyHlRGE+eVkhWRUpo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727405AbgBXMrh (ORCPT ); Mon, 24 Feb 2020 07:47:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:53002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgBXMrh (ORCPT ); Mon, 24 Feb 2020 07:47:37 -0500 Received: from localhost (95-141-97-180.as16211.net [95.141.97.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7444A2072D; Mon, 24 Feb 2020 12:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582548454; bh=RFoS0XwskBiZFNVHWB51s86/gyyO1NSdhT0NCh46r0k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eOh0VUShL3u9AXixt5yxW1EQBNqCAPvXRSNlnZgviaRMOD2UHVJDAeQQcpPwpK3ji unP7z+wZPN68hKpSKxwSl0o0AWeR8xaB5tFCLEyZ5BjW4VJZnk5ed+HjhIx/cZdqd6 N+8RpBunIjvkJNgqRkaF8dLX4pbaGlmbPurf+wyo= Date: Mon, 24 Feb 2020 13:47:32 +0100 From: Greg KH To: Geert Uytterhoeven Cc: Linus Torvalds , David Miller , Doug Ledford , Ira Weiny , Andrew Morton , Network Development , Linux Kernel Mailing List Subject: Re: [GIT] Networking Message-ID: <20200224124732.GA694161@kroah.com> References: <20150624.063911.1220157256743743341.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Feb 24, 2020 at 11:01:09AM +0100, Geert Uytterhoeven wrote: > 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/ Yes, we should not have any WARN_ON calls for something that userspace can trigger, because then syzbot will trigger it and we will get an annoying report saying to fix it :) thanks, greg k-h