Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7190330rwb; Tue, 15 Nov 2022 08:46:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf4bNLMK2+7BD5coyM/LeoFOlUpiadRFAuqwgc1vrUeF1bMKZ3f4OF59gGmRcYvUJcJZMk+0 X-Received: by 2002:a05:6402:28b0:b0:458:c66a:3664 with SMTP id eg48-20020a05640228b000b00458c66a3664mr15447473edb.79.1668530813686; Tue, 15 Nov 2022 08:46:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668530813; cv=none; d=google.com; s=arc-20160816; b=vEWL6ixckR2pC2bM0oB0YKFK7ljtk4sejpnbvkVrazrPltIzTgBS/mRnozjcfvSL0X EAX8/WD2sNy5dynBa98l61mgxI15cCfmLPqPnmxqei4KhZqVf+Q0T7l0H63wPeMEqJx+ vevpfX6rC/l3P9ZG7WQ0wrd2tw0q0Fv9SFmWoQeMAANPH4/LyxOtRn8BNi5+zi4BNIrE RB0f+IUSv6r+nZvZuWeS0ogoiOZHyzpd5hbB3vV/Iz79VfadOCBqM4BFrdjhiQruYdmB PvXl00gzabaRVFWxfN/tnutvHdJMTAn/dQy87UZPU0KRpBsp+bkl6dJCumn0ELvO0Crc qEsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IVRozCvsAl0N4wyUApbsWG3nXgbptg/3aW0X1ZtUpNU=; b=gyzQMEIjOqOc1gtH0mHmiPqqe7GSqYigeq+kTa8HByWxJjx2XgnPNpNgCKE3QWv2Ir /AVAwwm24BrnVDFT9O12ZfeR8zT4qiiwET6IT0xRUsPqww9Zs0QHxy2yP0g0M/BBHCJT BwF4f7hdWKv0ssGQYL1QQBnf0Bc/uKE5HvD4rSuYVu2ecYl+tYHtW8pYeJTJiZr0GPUY PW356JW3vjtkcVTkkvH4fbZt0MfzlCi5ZTAU+QXk3+bwpzzDkB3217cu71jg3keapuju DgRX3aclG4xwubVCi35ib2KMVrcRtlml1ycsfIJIeO/WBxGH7olqsIvsk843/M1YOuOf LSGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=hbYowYFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw18-20020a1709066a1200b007addf59b7f5si12164856ejc.794.2022.11.15.08.46.29; Tue, 15 Nov 2022 08:46:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=hbYowYFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238287AbiKOPkn (ORCPT + 90 others); Tue, 15 Nov 2022 10:40:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237952AbiKOPkl (ORCPT ); Tue, 15 Nov 2022 10:40:41 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97C6B29361; Tue, 15 Nov 2022 07:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=IVRozCvsAl0N4wyUApbsWG3nXgbptg/3aW0X1ZtUpNU=; b=hbYowYFDGyWEkJvrZPomeEH0C3 4RwaDvc2XtrOCw7djpk3RnIsFEjmZQpjxJGsnLLm9Z/cjeWGXzH3ie4nRTl5J7GKzi1H39AU9Fc5s 7Pca08Uiw+FwspSXAbusiGt5nHoQMXJMSwHhbpJJZ2zQg3d6vw+hnWSIGOMkwyXXAMt0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ouy2h-002TR0-OJ; Tue, 15 Nov 2022 16:40:07 +0100 Date: Tue, 15 Nov 2022 16:40:07 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: Daniil Tatianin , "David S. Miller" , Eric Dumazet , Paolo Abeni , Hao Chen , Guangbin Huang , Wolfram Sang , Marco Bonelli , Tom Rix , Tonghao Zhang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, yc-core@yandex-team.ru Subject: Re: [PATCH v1] net/ethtool/ioctl: ensure that we have phy ops before using them Message-ID: References: <20221114081532.3475625-1-d-tatianin@yandex-team.ru> <20221114210705.216996a9@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221114210705.216996a9@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2022 at 09:07:05PM -0800, Jakub Kicinski wrote: > On Mon, 14 Nov 2022 11:15:32 +0300 Daniil Tatianin wrote: > > + if (!(phydev && phy_ops && phy_ops->get_stats) && > > + !ops->get_ethtool_phy_stats) > > This condition is still complicated. > > > + return -EOPNOTSUPP; > > The only way this crash can happen is if driver incorrectly returns > non-zero stats count but doesn't have a callback to read the stats. > So WARN_ON() would be in order here. Hi Daniil I'm missing the patch itself, and b4 does not return it. Please consider reposting. Since this appear to be to do with PHY statistics, you should Cc: the PHY maintainers. Andrew