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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 648A2C6FD1F for ; Tue, 2 Apr 2024 16:04:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2OAJ6JcYgSKd4W8+TTKA0dK8I6tMqI5LYDtpNtmKakA=; b=1Dgv8sz/fM7InZ QkK4aTR5bGqptqez14u2Mlx9A7GiZdotUoiDpOBM6O87oTOkGaIiIJ3QM2HHITcDaP8i4ozrFC5tz 6XIPxF4rGSRz3Ixk5SZQWsLdZdLczEk3hFgHUJ6+hw3jTOyNI46MjPfcVOoKZEcyprGvCG9eTpOUK Cuv7qpeWXedfEMsdKb+2FA1Uhid5DjIFl6ZYr1cYSFNOQcr0kC/trqFmbBNlUBudPSilusDyQ+pTy iK4msIGpoDncUiobhNGzfru40ORPIMJdE99Z3K2f5roIsaokt/fUuQJb7YzSDEXx5vxRSW9hhcMdT aocqaB68Yllj4HKgStag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrgc5-0000000BwyP-0HLJ; Tue, 02 Apr 2024 16:03:53 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrgc1-0000000BwwX-199n for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 16:03:50 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 06BC9FF805; Tue, 2 Apr 2024 16:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712073826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lB0l3EgmoR6B4x67AYdVJyikUkYe+1vfYgUCVxFlTi4=; b=FHeCl4Ye91VysIY97+9CuN2lZTq+z+sDUDrrKaLQ6WGxlD7jJDCWWe6Qzyn1LiOuvTirKv DtUTV0DNxOUroUmyrf3CRGsIojegvluEPLIK6r8qOKjh10BVGyz3rQcJhtTbf3MBOPoe/G 8bkNo07L7FF0ygnG9Oo4FJsXUvwIGsuPgZxDhtwyPL0O8XxbVD9JMdk0lXIC5OvPa+32V3 uPqqLiaMMQEbHn9p2xMcQthSudzmC7GgSufy2qdZvrgib5PA8gRHJjBiuRno61pjz2+iY+ 6m/MTNKSS6ioZaOUtCrqL8ZuuQjPGwFBo05f2btGBm9974bd/xuHiyUJISF53g== Date: Tue, 2 Apr 2024 18:04:20 +0200 (CEST) From: Romain Gantois To: "Russell King (Oracle)" cc: Romain Gantois , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm , Alexandre Torgue , Jose Abreu , Maxime Coquelin , =?ISO-8859-15?Q?Cl=E9ment_L=E9ger?= , Thomas Petazzoni , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next 2/3] net: stmmac: add support for RZ/N1 GMAC In-Reply-To: Message-ID: <36a4a94f-494f-2fef-11e1-8b45011c1263@bootlin.com> References: <20240402-rzn1-gmac1-v1-0-5be2b2894d8c@bootlin.com> <20240402-rzn1-gmac1-v1-2-5be2b2894d8c@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: romain.gantois@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_090349_475642_9C864A00 X-CRM114-Status: GOOD ( 15.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Russell, On Tue, 2 Apr 2024, Russell King (Oracle) wrote: > > I'm afraid that this fails at one of the most basic principles of kernel > > multi-threaded programming. stmmac_dvr_probe() as part of its work calls > > register_netdev() which publishes to userspace the network device. > > > > Everything that is required must be setup _prior_ to publication to > > userspace to avoid races, because as soon as the network device is > > published, userspace can decide to bring that interface up. If one > > hasn't finished the initialisation, the interface can be brought up > > before that initialisation is complete. ... > > I'm not going to say that the two patches threaded to this email are > "sane" but at least it avoids the problem. socfpga still has issues > with initialisation done after register_netdev() though. Thanks a lot for providing a fix to this issue, introducing new pcs_init/exit() hooks seems like the best solution at this time, I'll make sure to integrate those patches in the v2 for this series. Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel