From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752288AbeACJhv (ORCPT + 1 other); Wed, 3 Jan 2018 04:37:51 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:40115 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbeACJht (ORCPT ); Wed, 3 Jan 2018 04:37:49 -0500 X-Google-Smtp-Source: ACJfBosjos7DRqd1E/HO7NFELJhrCoPAlA2MA9yBidQHB7H6Rst9d6x3hHA4Sw/U5g9RQz33n0JBNA== Subject: Re: [PATCH] nvme: check ctrl.tagset before start ns scan To: Jianchao Wang , keith.busch@intel.com, axboe@fb.com, hch@lst.de Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <1514916461-8696-1-git-send-email-jianchao.w.wang@oracle.com> From: Sagi Grimberg Message-ID: Date: Wed, 3 Jan 2018 11:37:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1514916461-8696-1-git-send-email-jianchao.w.wang@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Jianchao, > ctrl.tagset maybe NULL due to failure of io queue setup or blk-mq > tagset allocation in nvme_reset_work. Then panic would come up. > To fix this, just add ctrl.tagset check in nvme_scan_work. This came up before (and forgotten...) I think we should not have state indicators other than ctrl->state. How about instead we add a new state NVME_CTRL_ADMIN_LIVE when we have no I/O queues.