]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Clean control queues only when they are initialized
authorPreethi Banala <preethi.banala@intel.com>
Thu, 9 Aug 2018 13:28:55 +0000 (06:28 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 23 Aug 2018 16:51:44 +0000 (09:51 -0700)
commit2a4bd8ec607824dfaf72fd177750f81be6c3613d
tree5de1d2dc249a68935f6688a1c00970d1139f98cd
parent97fc7392e1c1b8e27771e5cbd961d5a3eeb0a408
ice: Clean control queues only when they are initialized

Clean control queues only when they are initialized. One of the ways to
validate if the basic initialization is done is by checking value of
cq->sq.head and cq->rq.head variables that specify the register address.
This patch adds a check to avoid NULL pointer dereference crash when tried
to shutdown uninitialized control queue.

Signed-off-by: Preethi Banala <preethi.banala@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_controlq.c