linux/drivers/net/ethernet/intel/ice
Jacob Keller dec64ff10e ice: use [sr]q.count when checking if queue is initialized
When shutting down the controlqs, we check if they are initialized
before we shut them down and destroy the lock. This is important, as it
prevents attempts to access the lock of an already shutdown queue.

Unfortunately, we checked rq.head and sq.head as the value to determine
if the queue was initialized. This doesn't work, because head is not
reset when the queue is shutdown. In some flows, the adminq will have
already been shut down prior to calling ice_shutdown_all_ctrlqs. This
can result in a crash due to attempting to access the already destroyed
mutex.

Fix this by using rq.count and sq.count instead. Indeed, ice_shutdown_sq
and ice_shutdown_rq already indicate that this is the value we should be
using to determine of the queue was initialized.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-09-27 08:00:21 -07:00
..
ice_adminq_cmd.h ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice_common.c ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice_common.h ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice_controlq.c ice: use [sr]q.count when checking if queue is initialized 2018-09-27 08:00:21 -07:00
ice_controlq.h ice: Initialize PF and setup miscellaneous interrupt 2018-03-26 10:34:49 -07:00
ice_devids.h
ice_ethtool.c ice: Implement handlers for ethtool PHY/link operations 2018-08-28 10:48:26 -07:00
ice_hw_autogen.h ice: Add support for Tx hang, Tx timeout and malicious driver detection 2018-08-28 10:58:42 -07:00
ice_lan_tx_rx.h ice: Rework flex descriptor programming 2018-08-28 09:18:47 -07:00
ice_main.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
ice_nvm.c ice: Update request resource command to latest specification 2018-08-28 10:17:06 -07:00
ice_osdep.h ice: Start hardware initialization 2018-03-26 09:59:08 -07:00
ice_sched.c ice: Updates to Tx scheduler code 2018-08-28 09:58:13 -07:00
ice_sched.h ice: Update Tx scheduler tree for VSI multi-Tx queue support 2018-03-26 12:21:42 -07:00
ice_status.h ice: Prevent control queue operations during reset 2018-08-28 10:20:00 -07:00
ice_switch.c ice: Implement ice_bridge_getlink and ice_bridge_setlink 2018-08-28 11:01:06 -07:00
ice_switch.h ice: Implement ice_bridge_getlink and ice_bridge_setlink 2018-08-28 11:01:06 -07:00
ice_txrx.c ice: Add support for Tx hang, Tx timeout and malicious driver detection 2018-08-28 10:58:42 -07:00
ice_txrx.h ice: Add support for Tx hang, Tx timeout and malicious driver detection 2018-08-28 10:58:42 -07:00
ice_type.h ice: Enable firmware logging during device initialization. 2018-08-28 11:04:04 -07:00
ice.h ice: Introduce SERVICE_DIS flag and service routine functions 2018-08-28 11:11:18 -07:00
Makefile ice: Add stats and ethtool support 2018-03-26 12:11:19 -07:00