From patchwork Mon Feb 27 14:39:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9593299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8135560453 for ; Mon, 27 Feb 2017 14:45:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 729C4283FD for ; Mon, 27 Feb 2017 14:45:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 656D928487; Mon, 27 Feb 2017 14:45:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC7CB283FD for ; Mon, 27 Feb 2017 14:45:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751454AbdB0Op4 (ORCPT ); Mon, 27 Feb 2017 09:45:56 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35465 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751548AbdB0Opy (ORCPT ); Mon, 27 Feb 2017 09:45:54 -0500 Received: by mail-wm0-f67.google.com with SMTP id u63so13761942wmu.2 for ; Mon, 27 Feb 2017 06:45:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=L2EeiP345Q44JgydLVET9hnUq0f6QgUzi57QD3GBrAU=; b=Yp/OY/uqqagoTNpeWsTg9Y01wek/biqLUHUPY7yWQo5pLHs7T7vudGK5vKgPrw40Fq 4P0SEQo71S8LHLqHFpKRvMZAF1beJ6ywbVVqv+SjbSUyTxcc+dyUiOr3XJGxkA3eLJzG IvArwUHT7gCUCBJW01kZJnEuueXtmNUNv3HH8MjWbejM/jgSUXo5mWHq8n6hFuRmcmWW rXv48boRmkgtSBnmeQunR3SH74xa3uJFt81Gq8MUUYp8uxdUOom6nQvTyZT1kz9PHjWN OP74dvJdcRnhU/0Qz6lBLgzqWFaOwlyy7iSfAv+bllq6SQfJiLr+poYLhNeKfzCyd24X q4Sg== X-Gm-Message-State: AMke39neKQbktD+Dxzz/1KqikpkuPiiVQnS7QzLgeSsTdwECgYVOTObcZQ8gKrCUSeoGXA== X-Received: by 10.28.146.207 with SMTP id u198mr13591237wmd.36.1488206345884; Mon, 27 Feb 2017 06:39:05 -0800 (PST) Received: from [192.168.64.116] (bzq-82-81-101-184.red.bezeqint.net. [82.81.101.184]) by smtp.gmail.com with ESMTPSA id q4sm22594453wrc.35.2017.02.27.06.39.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Feb 2017 06:39:04 -0800 (PST) Subject: Re: nvmf regression with mq-deadline To: Jens Axboe , "linux-block@vger.kernel.org" , linux-nvme References: <8384a5c8-c8e6-4e46-65d6-208b802f6957@grimberg.me> <34fb43d6-37e7-feb3-73c6-63140993ba7c@grimberg.me> From: Sagi Grimberg Message-ID: <0f06d732-fe32-bca0-8a4d-299a6cce7a6e@grimberg.me> Date: Mon, 27 Feb 2017 16:39:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <34fb43d6-37e7-feb3-73c6-63140993ba7c@grimberg.me> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > Now I'm getting a NULL deref with nvme-rdma [1]. > > For some reason blk_mq_tag_to_rq() is returning NULL on > tag 0x0 which is io queue connect. > > I'll try to see where this is coming from. > This does not happen with loop though... That's because the loop driver does not rely on the cqe.command_id to resolve the submitted request (I'll fix that). Looks like blk_mq_alloc_request_hctx was overlooked when the back assignment of the request to the rq_map... This patch solves the issue for fabrics: --- -- If its agreed with everyone I'll send a proper patch for this and the blk_mq_sched_setup fix? diff --git a/block/blk-mq.c b/block/blk-mq.c index d84c66fb37b7..9611cd9920e9 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -312,6 +312,7 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw, ret = -EWOULDBLOCK; goto out_queue_exit; } + alloc_data.hctx->tags->rqs[rq->tag] = rq; return rq;