Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 044DB1A923A for ; Tue, 1 Sep 2020 04:19:17 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 8B53584D84; Tue, 1 Sep 2020 04:19:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0DD8984D82 for ; Tue, 1 Sep 2020 04:19:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id kI_9odTOWu98 for ; Tue, 1 Sep 2020 04:19:16 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 9B59784D80 for ; Tue, 1 Sep 2020 04:19:16 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 93E51FB28; Tue, 1 Sep 2020 04:19:16 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Tue, 1 Sep 2020 04:19:16 +0000 From: "SAITOH Masanobu" Subject: CVS commit: src/sys/dev/pci/ixgbe To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200901041916.93E51FB28@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "SAITOH Masanobu" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: msaitoh Date: Tue Sep 1 04:19:16 UTC 2020 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_osdep.h Log Message: Fix a panic on shutdown on a machine which use the recovery mode timer. The recovery mode timer is first issued by the callout and it schedule the workqueue. The workqueue then reschedule the callout. It's hard to stop both of them without race only with callout_stop() and workqueue_wait. To solve this problem. add new "detaching" flag and use it. The situation is almost the same as schedule_wqs_ok for the local_timer's callout and workqueue, but the difference is that the local_timer isn't required to run if the interface is not up. If it's not important to prevent running timer while !IFF_UP, the flag can be integrated into one. To generate a diff of this commit: cvs rdiff -u -r1.253 -r1.254 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_osdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.