Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1785272rdh; Tue, 26 Sep 2023 03:38:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjBUyexBuvjHEx4bLykl4Q4n15JqEYea/gGBYV1kQCifDQMkn9NORExklDNYKxU3FPjVGI X-Received: by 2002:a25:ad50:0:b0:d81:6e88:7cb3 with SMTP id l16-20020a25ad50000000b00d816e887cb3mr9543450ybe.47.1695724712851; Tue, 26 Sep 2023 03:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695724712; cv=none; d=google.com; s=arc-20160816; b=A3TDVMyPZ8vXEjpUi7wD6bRPMDwyRkuf1hLSaHGaaqSvS4DFMzQfIq6O4OMV0CCTfB bdjWVQOOB88b19khWfgEF38OndFXNnpvTXqUD57jMFyIOxRyw8P/lETQYKt3nj9vTXMP H2ZM9qHsMpZriBDZ8mbfVE9nrXCX89eCLljXO4qY2XUFjAr8W8fCIUbbvo6VqFTExobE uKPmIJljqrD0+wxW7j09A44/1a3swbIbMvUZVyeb4D+6z+v0WSKOFTdNp/u69JhESpf0 f3KPGcpClMSED9RpzOHrTmQpIHo4jJ2FzN4n0oYbbJ0h4AkPNXzsda7dDUCvmLATEcTi BWPg== 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; bh=AaT3nUoqL4s1qj4033O/FUPOrnZBVTpbCy4FtWcYKfQ=; fh=l62TKIFr5WcI2DHoUqW59+iSjDBfX9U32kzhMM5A0EY=; b=GxcnkWBNGKGtSLTqDHwEVNIYEw43LbaHmVXPL8Zyb85udvnf+dphPqFuaYd3paz3XN WAXXlwKw6l7GTkHn7szL88bfs/gb/INw5t3z4sheWktGe8dfWBu0LtPtj/8x7u3bGvG4 mWYeYP0f74RXJCZVDhDdZERU4/af/mZIM8rlOMrW6e7vjGnmh39WTGjWRKrqT0djSA1m 1EAb8IfNnR3wDlLXz6w4I8HxCoxtXfJzASJSvxaCVZH8ozAi77KSdIH0YmhOtehs23kR gIyaJY0U5K0gQ43My6S45N76ioGAbGb++D9k4QjDrd/ytFycllzavsHSCX/Dipe7vmrp 72dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y17-20020a63de51000000b00578bea3c10esi1578138pgi.756.2023.09.26.03.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 03:38:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D03AA8197EBB; Tue, 26 Sep 2023 02:48:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234240AbjIZJsw (ORCPT + 99 others); Tue, 26 Sep 2023 05:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231284AbjIZJsu (ORCPT ); Tue, 26 Sep 2023 05:48:50 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAEBFB3; Tue, 26 Sep 2023 02:48:40 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id D60C6C0008; Tue, 26 Sep 2023 09:48:36 +0000 (UTC) Date: Tue, 26 Sep 2023 11:47:56 +0200 From: Remi Pommarel To: Paolo Abeni Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Maxime Coquelin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH net v2] net: stmmac: remove unneeded stmmac_poll_controller Message-ID: References: <20230906091330.6817-1-repk@triplefau.lt> <626de62327fa25706ab1aaab32d7ba3a93ab26e4.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <626de62327fa25706ab1aaab32d7ba3a93ab26e4.camel@redhat.com> X-GND-Sasl: repk@triplefau.lt X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:48:49 -0700 (PDT) On Thu, Sep 07, 2023 at 11:23:16AM +0200, Paolo Abeni wrote: > On Wed, 2023-09-06 at 11:13 +0200, Remi Pommarel wrote: > > Using netconsole netpoll_poll_dev could be called from interrupt > > context, thus using disable_irq() would cause the following kernel > > warning with CONFIG_DEBUG_ATOMIC_SLEEP enabled: > > > > BUG: sleeping function called from invalid context at kernel/irq/manage.c:137 > > in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 10, name: ksoftirqd/0 > > CPU: 0 PID: 10 Comm: ksoftirqd/0 Tainted: G W 5.15.42-00075-g816b502b2298-dirty #117 > > Hardware name: aml (r1) (DT) > > Call trace: > > dump_backtrace+0x0/0x270 > > show_stack+0x14/0x20 > > dump_stack_lvl+0x8c/0xac > > dump_stack+0x18/0x30 > > ___might_sleep+0x150/0x194 > > __might_sleep+0x64/0xbc > > synchronize_irq+0x8c/0x150 > > disable_irq+0x2c/0x40 > > stmmac_poll_controller+0x140/0x1a0 > > netpoll_poll_dev+0x6c/0x220 > > netpoll_send_skb+0x308/0x390 > > netpoll_send_udp+0x418/0x760 > > write_msg+0x118/0x140 [netconsole] > > console_unlock+0x404/0x500 > > vprintk_emit+0x118/0x250 > > dev_vprintk_emit+0x19c/0x1cc > > dev_printk_emit+0x90/0xa8 > > __dev_printk+0x78/0x9c > > _dev_warn+0xa4/0xbc > > ath10k_warn+0xe8/0xf0 [ath10k_core] > > ath10k_htt_txrx_compl_task+0x790/0x7fc [ath10k_core] > > ath10k_pci_napi_poll+0x98/0x1f4 [ath10k_pci] > > __napi_poll+0x58/0x1f4 > > net_rx_action+0x504/0x590 > > _stext+0x1b8/0x418 > > run_ksoftirqd+0x74/0xa4 > > smpboot_thread_fn+0x210/0x3c0 > > kthread+0x1fc/0x210 > > ret_from_fork+0x10/0x20 > > > > Since [0] .ndo_poll_controller is only needed if driver doesn't or > > partially use NAPI. Because stmmac does so, stmmac_poll_controller > > can be removed fixing the above warning. > > > > [0] commit ac3d9dd034e5 ("netpoll: make ndo_poll_controller() optional") > > > > Cc: # 5.15.x > > Signed-off-by: Remi Pommarel > > I'm sorry for the incremental feedback, but we also need a suitable > Fixes tag, thanks! I didn't include Fixes tag because it would go back up to the initial driver support commit [0]. I can't be sure that this commit includes necessary NAPI implementation to be able to get rid of .ndo_poll_controller callback back then. And I am not able to test it on older version than 5.15.x hence I only included the 5.15.x Cc tag version prerequisite. But I surely can add a Fixed tag if it is ok for it to be [0]. Also sorry for the long replying delay. [0] commit 47dd7a540b8a ("net: add support for STMicroelectronics Ethernet controllers") -- Remi