Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp542685ybg; Sun, 26 Jul 2020 12:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwboQ4WhJtHNnQRbMHMcToDMUUKvdHLlD21PQJy0ec/Rz1SbAgHBIzyJslwmdTMtXN6jNcy X-Received: by 2002:a05:6402:456:: with SMTP id p22mr871613edw.177.1595792774538; Sun, 26 Jul 2020 12:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595792774; cv=none; d=google.com; s=arc-20160816; b=Fk/IUk4aXeZR0g0rX5OS7l7OHBqSMY9mWX654c4FGQqrXJK4QHOKPvYY1BDsvD1cDe Y5VIrcjhhy1bzVbC/nuvOv9msovX87vTJOiOfV57FV2bHl/YqGSVJd9ChTl64oOnWQ7m CvKGliFfL7W+i3TkPUBAkeb/j/XFTMq0SoKezYQXHTBw/yHxkXj9hfRCdjp18jg06pjX jX6wvIMtVZK5h+WmwUW+F+YmJfrQGTNmCkOejpU5gImwMeWQ8ljPGhc0qjf5ouvQVmWJ GD8kx3OvnN0W85KDtt96F9ErlGUkUYwIW1y6w7dA2UHRFi5rYKO9OVE2WKPW8PMxvol4 ZDuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=9JkAhJDqvFZhWTc0F7UA1EV+R0vUufGLRpu0MdvaDBA=; b=vZfNyhEDA8cLK8UCEbeFt1ZXc5ybjnvc3td3Ov+BnynobKdY/X2tqzCuhQxNyOGqWK 7PC7habXvrkPO48aXpSq+yKXXUYAcLG/PdoihTkQJPEaYPwLNK/hoKeo1q9W8lEVA9Uy HYH0VE+RA+1pAWoRH77sb6C4nUoly/UT1xXdtWjG+Rb2W5uIiEsPF16iui5T6LgzemQc clFgoIYFJIAi34Xu2LSpp0THdCqbz9t1AG8jexMAlxFmyoT57x1eJsWED4JasZGTiHG3 OBX0/CdPRoc3A0iMgxnJuLp+N4WOolHaNagftK9q9mWJW+/mz/BoBXaslcRLTvwthahW vceA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x15si1156136eje.180.2020.07.26.12.45.52; Sun, 26 Jul 2020 12:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbgGZTpj (ORCPT + 99 others); Sun, 26 Jul 2020 15:45:39 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56146 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbgGZTpj (ORCPT ); Sun, 26 Jul 2020 15:45:39 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jzmaO-006zNB-FQ; Sun, 26 Jul 2020 21:45:28 +0200 Date: Sun, 26 Jul 2020 21:45:28 +0200 From: Andrew Lunn To: Ilia Lin Cc: davem@davemloft.net, kuba@kernel.org, jiri@mellanox.com, edumazet@google.com, ap420073@gmail.com, xiyou.wangcong@gmail.com, maximmi@mellanox.com, ilia.lin@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: dev: Add API to check net_dev readiness Message-ID: <20200726194528.GC1661457@lunn.ch> References: <1595792274-28580-1-git-send-email-ilial@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1595792274-28580-1-git-send-email-ilial@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 26, 2020 at 10:37:54PM +0300, Ilia Lin wrote: > From: Ilia Lin > > Add an API that returns true, if the net_dev_init was already called, > and the driver was initialized. > > Some early drivers, that are initialized during the subsys_initcall > may try accessing the net_dev or NAPI APIs before the net_dev_init, > and will encounter a kernel bug. This API provides a way to handle > this and manage by deferring or by other way. Hi Ilia You need to include a user of this new API. I also have to wonder why a network device driver is being probed the subsys_initcall. Andrew