Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp818392img; Thu, 21 Mar 2019 09:33:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrppdUimjn50OR0E7epgXXzN4YqJv7olP357EenOJTImUFDvweHBsihphqJkt+j70iCQTC X-Received: by 2002:a63:db07:: with SMTP id e7mr3826020pgg.231.1553185983975; Thu, 21 Mar 2019 09:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553185983; cv=none; d=google.com; s=arc-20160816; b=LGDvAld/JJRMFprh5Bd3QkoAuMlF1w9OgcvPHEtItTRJyF5S84mMPueEhM/Eax5aDg /EbuWcoDKVAI2ZzAunoEW9T38pOS5BgYeMhJNDZcPAN+H0ziDshbOgZpsH+VR4rku3l8 M2ElKoSRfLdWxpqjVysTymiuhQtkMtySxjgqAEkCOoDPoOuJ9FUndpFiq0n1jgQi57UX S83/x9n8fUuncD2aa3Gp7/Mj+BeEP+3MrFa7uO10M+D/Hao0MutYDItn49o2hV+gOIHV lJET8Zy0YpMh1/g8H9wvh0by/jMdJDOom5+oITKB9X9M3YUrq7JKjPmuPukSWnfo2Tne h1DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2sRA47FZKpicovMeDkeJXEQstEcAFgdARs7Q921qnf4=; b=Bp/B8KC6GLFMRy5zk2UsxGw9QblYn6Zp61XZajrltEMhImbtnviZJGo5VhohJvRXtK 7I5jJjnOJoyMZUPX8GosWBlRxTWTUpwPwV7fqVedhPOBZNHEJVWc9wGQu2B6ehzuWKOY hq2/jle1LOfCfWkajrT0rt+wQiNQllRgJuto73ldFEKh8jNABKejzES4rJCKkNQ3lDuO BmqEZeJV4lMWM0U7wUJdIzpnZQJXhDUrQPGpE8Hsf3vUaBOwfzMLBoAwO6QCoHg1rKAg h69PwFXWzO0R0f9Vu7INh+mPQZYqS1Ep45HDa6NABoken1IqC43j0YbY63G2F06/ANxO XMUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=teUYffsK; 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 az11si4759522plb.19.2019.03.21.09.32.44; Thu, 21 Mar 2019 09:33:03 -0700 (PDT) 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; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=teUYffsK; 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 S1728557AbfCUQbs (ORCPT + 99 others); Thu, 21 Mar 2019 12:31:48 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51389 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728138AbfCUQbr (ORCPT ); Thu, 21 Mar 2019 12:31:47 -0400 Received: by mail-wm1-f68.google.com with SMTP id 4so2926866wmf.1 for ; Thu, 21 Mar 2019 09:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2sRA47FZKpicovMeDkeJXEQstEcAFgdARs7Q921qnf4=; b=teUYffsK5Z1tSPtQr2DXXJtXg+ZM5hmanWEofPQ1nr3qob5up8VPsrLtXAqgoNUdi5 e9GxcoIE0ENx1VlLCnYnQa03mXTkgRxiQjH4cRO8z27GKQ/XlOPk06pV9hnou1ZdKchD 8EX20VCxlCotMZWDk0ziBOEIZhczuCiV+CXYZ2sonq8mJvyE23o8rOMDpLGaonjz7YSg tHO9vrYC/Z/7HqanF2EaypuD+eX9iQ5liB7q60PnT4BeyyooUxJBNpSGna5UWI4Os4Dc IUu6O1zhBElEtCythGbcK9VOoCy6lE0WgvDxl5loVo2g7rF9d0cdWshkcTFOW+mVtz7B kLhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2sRA47FZKpicovMeDkeJXEQstEcAFgdARs7Q921qnf4=; b=Q/ukulwQSLRGuT4jjN/wMdu+qYekPJL6deRIZsoU0lntZyQEOyPsnlVGmheYCI19Ci BZd3Zf0nUAUxluhdZHFkaxJUQ9+HrmsMStkd8f7VMddyVoQeKusY3Y4f1o/O9D8bA1PP MrXB1ZJx9iYKW1EHqY21XDKNGbHe0dcNpq/T7eW3ST763XdfnA7Ac6n5LgMM38FZ6vfC xz8T+0Edps10B/AYOczfVb3uc7mK27XW9/3jwqq8P/Vpspm0qvZp6eG0pGB//yGg0Jy3 FQ6Fojsl6bmcNaMe3wh+8iu9st6p6W1Z8VtV+XW8OaAHh3/U56+V90Sj4t/q1YyX52dS jTwA== X-Gm-Message-State: APjAAAU+rtwJS59VDrSQuF9zyh5S4GwgTFYx1uMiXPG8DvN84y+DHx8W 2YGt34V1d5znDJr963prYYCSsg== X-Received: by 2002:a05:600c:210e:: with SMTP id u14mr110212wml.50.1553185905860; Thu, 21 Mar 2019 09:31:45 -0700 (PDT) Received: from localhost ([195.39.71.253]) by smtp.gmail.com with ESMTPSA id 3sm7594392wrk.68.2019.03.21.09.31.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 09:31:45 -0700 (PDT) Date: Thu, 21 Mar 2019 17:21:06 +0100 From: Jiri Pirko To: Andrew Lunn Cc: Michal Kubecek , David Miller , netdev@vger.kernel.org, Jakub Kicinski , Florian Fainelli , John Linville , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v4 05/22] ethtool: introduce ethtool netlink interface Message-ID: <20190321162105.GU2087@nanopsycho> References: <20190321135705.GB17655@lunn.ch> <20190321141343.GH29968@unicorn.suse.cz> <20190321152509.GB23408@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190321152509.GB23408@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thu, Mar 21, 2019 at 04:25:09PM CET, andrew@lunn.ch wrote: >On Thu, Mar 21, 2019 at 03:13:43PM +0100, Michal Kubecek wrote: >> On Thu, Mar 21, 2019 at 02:57:05PM +0100, Andrew Lunn wrote: >> > On Thu, Mar 21, 2019 at 02:07:35PM +0100, Michal Kubecek wrote: >> > > +static int __init ethnl_init(void) >> > > +{ >> > > + int ret; >> > > + >> > > + ret = genl_register_family(ðtool_genl_family); >> > > + if (ret < 0) >> > > + panic("ethtool: could not register genetlink family\n"); >> > >> > Panic seems a bit strong. Do we really want to kill the box because >> > this fails? >> >> When I switched CONFIG_ETHTOOL_NETLINK from tristate to bool, I checked >> some other non-modular subsystems to see what they do on failed >> initialization and each of them did handle it by panic() so I didn't >> think about it too much and did the same. >> >> Thinking about it now, if the family registration fails, the only entry >> point to care about should be ethtool_notify() (I'll have to check more >> carefully to be sure) so that adding a check there should be sufficient >> to let everything work (except for the netlink interface, of course). > >Hi Michal > >So maybe do a WARN_ON() and return the error code. +1 > >Linus has been quite vocal about killing the box when there is no real >need... > > Andrew