]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvme: Don't suspend admin queue that wasn't created
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Tue, 6 Sep 2016 20:39:13 +0000 (17:39 -0300)
committerAshok Vairavan <ashok.vairavan@oracle.com>
Wed, 19 Jul 2017 20:02:23 +0000 (13:02 -0700)
commit7b6f034acde9ab5171883009cb67e67915834433
tree16b184bc43b08aa6d3ead3da0bbec6ec0c946bc2
parentb62a462854e959971570c07f2a076951c44dd758
nvme: Don't suspend admin queue that wasn't created

This fixes a regression in my previous commit c21377f8366c ("nvme:
Suspend all queues before deletion"), which provoked an Oops in the
removal path when removing a device that became IO incapable very early
at probe (i.e. after a failed EEH recovery).

Turns out, if the error occurred very early at the probe path, before
even configuring the admin queue, we might try to suspend the
uninitialized admin queue, accessing bad memory.

Fixes: c21377f8366c ("nvme: Suspend all queues before deletion")
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Reviewed-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 82469c59d222f839ded5cd282172258e026f9112)

Orabug: 26486098

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/pci.c