From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:48774 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934131AbdDFIH1 (ORCPT ); Thu, 6 Apr 2017 04:07:27 -0400 Subject: Patch "nvme/core: Fix race kicking freed request_queue" has been added to the 4.10-stable tree To: keith.busch@intel.com, axboe@fb.com, gregkh@linuxfoundation.org, hch@lst.de, jthumshirn@suse.de, sagi@grimberg.me Cc: , From: Date: Thu, 06 Apr 2017 10:07:07 +0200 Message-ID: <1491466027218209@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled nvme/core: Fix race kicking freed request_queue to the 4.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nvme-core-fix-race-kicking-freed-request_queue.patch and it can be found in the queue-4.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From f33447b90e96076483525b21cc4e0a8977cdd07c Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Fri, 10 Feb 2017 18:15:51 -0500 Subject: nvme/core: Fix race kicking freed request_queue From: Keith Busch commit f33447b90e96076483525b21cc4e0a8977cdd07c upstream. If a namespace has already been marked dead, we don't want to kick the request_queue again since we may have just freed it from another thread. Signed-off-by: Keith Busch Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/host/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2034,9 +2034,9 @@ void nvme_kill_queues(struct nvme_ctrl * * Revalidating a dead namespace sets capacity to 0. This will * end buffered writers dirtying pages that can't be synced. */ - if (ns->disk && !test_and_set_bit(NVME_NS_DEAD, &ns->flags)) - revalidate_disk(ns->disk); - + if (!ns->disk || test_and_set_bit(NVME_NS_DEAD, &ns->flags)) + continue; + revalidate_disk(ns->disk); blk_set_queue_dying(ns->queue); blk_mq_abort_requeue_list(ns->queue); blk_mq_start_stopped_hw_queues(ns->queue, true); Patches currently in stable-queue which might be from keith.busch@intel.com are queue-4.10/nvme-pci-disable-on-removal-when-disconnected.patch queue-4.10/nvme-core-fix-race-kicking-freed-request_queue.patch