Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Don't schedule admin work while shutdown l...
details: https://anonhg.NetBSD.org/src/rev/5244a45043fc
branches: trunk
changeset: 938377:5244a45043fc
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Sep 07 03:57:27 2020 +0000
description:
Don't schedule admin work while shutdown like the recovery mode timer.
The admin workqueue also runs while !IFF_UP like the recovery mode timer.
Apply the same change of ixgbe.c 1.254 to ixgbe_schedule_admin_tasklet()
to prevent panic. Found by ozaki-r@.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (24 lines):
diff -r 9470e85b6473 -r 5244a45043fc sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Sep 07 03:50:41 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Sep 07 03:57:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.254 2020/09/01 04:19:16 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.255 2020/09/07 03:57:27 msaitoh Exp $ */
/******************************************************************************
@@ -1538,9 +1538,11 @@
ixgbe_schedule_admin_tasklet(struct adapter *adapter)
{
- if (atomic_cas_uint(&adapter->admin_pending, 0, 1) == 0)
- workqueue_enqueue(adapter->admin_wq,
- &adapter->admin_wc, NULL);
+ if (__predict_false(adapter->osdep.detaching == false)) {
+ if (atomic_cas_uint(&adapter->admin_pending, 0, 1) == 0)
+ workqueue_enqueue(adapter->admin_wq,
+ &adapter->admin_wc, NULL);
+ }
}
/************************************************************************
Home |
Main Index |
Thread Index |
Old Index