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 9B5AFC47422 for ; Wed, 17 Jan 2024 07:20:19 +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:In-Reply-To: Message-ID: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=e6eUhoCRWH7jG+A4HvHIT3Y1sHMrRnEcMBRcAtf1l5Q=; b=dyRQDWnM0MWp4l sceOHCgvlybaqe3q3DfT0uK6Ch8t1E0MdU5mfCaFfig4Xk1LVhAqBMUOZrfmg1KqODvci73OYj++g dN7vqsaqkUG9h7q+FRYobKI986wTh/m2jk0EqZR2eauonxKTiwIN03nRAvF3VH+U2dqvQO0PwZCaL 7rEnpQmsY/w0tL5ncAgatsc2ZJVluna+l4Qqc4c1HHiXZSv+7LX/qGPJZtQmFLWBudolx6j3BVki3 9SMOF+1ENui9OAlfL3tmKFxYpJO3l6OaW75TmhyWP0fVNKxPbQLXpMa3OnQwJEbpln1aGf3LYY1b+ QcO9wrEoK16VTRTNdZeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ0DC-00EfUQ-04; Wed, 17 Jan 2024 07:19:46 +0000 Received: from smtpbgeu1.qq.com ([52.59.177.22]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ0D4-00EfRm-2R for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2024 07:19:43 +0000 X-QQ-mid: bizesmtp73t1705475881tkpi85e2 X-QQ-Originating-IP: FYn/tP70RTD9loVdowaM081VuTJVAfGriLwvRblxkgg= Received: from john-PC ( [123.114.60.34]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 17 Jan 2024 15:17:59 +0800 (CST) X-QQ-SSF: 01400000000000E0L000000A0000000 X-QQ-FEAT: eSZ1CZgv+JDSNC9R2Ts4bQ0s1IO7bzp2HpCI/alvnKdhK2ce+ScKIRclelfo3 i51jCIHNe3Uj0pPQHcTQ95pOKWuRXyWDW3I9EGM/2puBgCYmHjq/2LsRwKbvE8rv6M5YShX +RNX5hNAQwHK5GlakP/+rmSaZPV4Jze6Hh7zG0jGrCC3kwxNTeRiFJYGCNKwUr99q3dVr8t f+0cmctmjGHstn0Ykxofmi0OZOsisfjMKTq/Vw9O+J/1J7ablmQ+b8WymrCzYFhREA+LddF fiKyVAcNfB0IeKrlBRtrroOyZIeNv3DOE7Ku78ZkHncoEnEqd5a3HQFjmmAuCq989imHmoP 5S2bya1XPNgQKhDPSAPYfRuBj5e+cYxdQ42NnVXpxG1xk254xAu7hSsHPwT9nenjC5nq8yA X-QQ-GoodBg: 1 X-BIZMAIL-ID: 10667195349907418171 Date: Wed, 17 Jan 2024 15:17:59 +0800 From: Qiang Ma To: Andrew Lunn Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls Message-ID: <264E2933B2545567+20240117151759.0dc40c3d@john-PC> In-Reply-To: <97106e8a-df9a-429a-a4ff-c47277de70d9@lunn.ch> References: <20240112021249.24598-1-maqianga@uniontech.com> <97106e8a-df9a-429a-a4ff-c47277de70d9@lunn.ch> Organization: UOS X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvrsz:qybglogicsvrsz4a-0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240116_231939_280186_4A3547E3 X-CRM114-Status: GOOD ( 15.26 ) 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 On Tue, 16 Jan 2024 23:27:39 +0100 Andrew Lunn wrote: > On Fri, Jan 12, 2024 at 10:12:49AM +0800, Qiang Ma wrote: > > We found the following dmesg calltrace when testing the GMAC NIC > > notebook: > > > > [9.448656] ------------[ cut here ]------------ > > [9.448658] Unbalanced IRQ 43 wake disable > > [9.448673] WARNING: CPU: 3 PID: 1083 at kernel/irq/manage.c:688 > > irq_set_irq_wake+0xe0/0x128 [9.448717] CPU: 3 PID: 1083 Comm: > > ethtool Tainted: G O 4.19 #1 [9.448773] ... > > [9.448774] Call Trace: > > [9.448781] [<9000000000209b5c>] show_stack+0x34/0x140 > > [9.448788] [<9000000000d52700>] dump_stack+0x98/0xd0 > > [9.448794] [<9000000000228610>] __warn+0xa8/0x120 > > [9.448797] [<9000000000d2fb60>] report_bug+0x98/0x130 > > [9.448800] [<900000000020a418>] do_bp+0x248/0x2f0 > > [9.448805] [<90000000002035f4>] handle_bp_int+0x4c/0x78 > > [9.448808] [<900000000029ea40>] irq_set_irq_wake+0xe0/0x128 > > [9.448813] [<9000000000a96a7c>] stmmac_set_wol+0x134/0x150 > > [9.448819] [<9000000000be6ed0>] dev_ethtool+0x1368/0x2440 > > [9.448824] [<9000000000c08350>] dev_ioctl+0x1f8/0x3e0 > > [9.448827] [<9000000000bb2a34>] sock_ioctl+0x2a4/0x450 > > [9.448832] [<900000000046f044>] do_vfs_ioctl+0xa4/0x738 > > [9.448834] [<900000000046f778>] ksys_ioctl+0xa0/0xe8 > > [9.448837] [<900000000046f7d8>] sys_ioctl+0x18/0x28 > > [9.448840] [<9000000000211ab4>] syscall_common+0x20/0x34 > > [9.448842] ---[ end trace 40c18d9aec863c3e ]--- > > > > Multiple disable_irq_wake() calls will keep decreasing the IRQ > > wake_depth, When wake_depth is 0, calling disable_irq_wake() again, > > will report the above calltrace. > > > > Due to the need to appear in pairs, we cannot call > > disable_irq_wake() without calling enable_irq_wake(). Fix this by > > making sure there are no unbalanced disable_irq_wake() calls. > > Just for my understanding. You trigger this by doing lots of > > ethtool -s eth42 wol g > > or similar without doing a matching > > ethtool -s eth42 wol d > > to disable wol? > > Its a bit late now, but its good to give instructions how to reproduce > the issue in the commit message. > > Andrew > yes, my environment has not call enable_irq_wake(), so calling disable_irq_wake() directly through the "ethtool -s ethxx wol d" command will cause this problem. Qiang Ma _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel