]> 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)
commit1b0b0e2496b33cc6fbf4715368fa23fc67bdafc8
tree5de1d2dc249a68935f6688a1c00970d1139f98cd
parentb3ca204eae4be7e4163a03d40d8afac3a87d4fed
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