From patchwork Sun Apr 8 10:36:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 10328307 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 3D15660385 for ; Sun, 8 Apr 2018 10:36:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FA86289EB for ; Sun, 8 Apr 2018 10:36:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1239628F0F; Sun, 8 Apr 2018 10:36:33 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 A7B6A289EB for ; Sun, 8 Apr 2018 10:36:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751367AbeDHKgc (ORCPT ); Sun, 8 Apr 2018 06:36:32 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:55751 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751331AbeDHKgb (ORCPT ); Sun, 8 Apr 2018 06:36:31 -0400 Received: by mail-wm0-f41.google.com with SMTP id b127so11724676wmf.5 for ; Sun, 08 Apr 2018 03:36:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MaUIUYSMFyoi2ycK98XiMYKx3ATWt/yYIimsXN3z+W8=; b=mpEOjMYhdxqUVF5qtiunQDqc4ikas3jAD0Xyr+0QrluxqDiVzwPurtDzfF+0Vbt/mw iDmYBvMauymPzmZeWm/damUQL4UAjruMGbP00F/h4PbRQoYrwhZqfTLyiZy9O6mKpLiU l0tMFLyjnoh8d7yD9zJPOh+/GujQDp2vmzRIGSolUbDzz3yi4EcHD+wNQWmstVIEq+lc cIwh8RCj2oXU5D7AjvoQIme/QX1gXg63LpL08jeAtD3qy1m5HU93/DPAs8liwpoCz6rg Gm5I5z0SSkeX4qXPyJzQYkYXgr014Lj7WyTpp8slgQclMtl/UsYfkTCTkKT83cIQJkX1 kt7Q== X-Gm-Message-State: ALQs6tCbyyGc/XwQWpxDb+QMZCUeCnQdr2gmHhquWdIroUyGuHeD4L+0 EwxmLehm7LvN0i2EuK5W0+Y= X-Google-Smtp-Source: AIpwx48vORe+2dJzr5RZrOndha9G4qjYSRcwEnMLfhbhRLmZyUaaaqIc+XZVWJH9vDkh66Y+2kEG8A== X-Received: by 10.28.245.16 with SMTP id t16mr2206799wmh.63.1523183790198; Sun, 08 Apr 2018 03:36:30 -0700 (PDT) Received: from [192.168.64.169] (bzq-219-42-90.isdn.bezeqint.net. [62.219.42.90]) by smtp.gmail.com with ESMTPSA id b40sm28017140wrb.88.2018.04.08.03.36.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Apr 2018 03:36:29 -0700 (PDT) Subject: Re: BUG at IP: blk_mq_get_request+0x23e/0x390 on 4.16.0-rc7 To: Yi Zhang Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Ming Lei References: <10632862.17524551.1522402353418.JavaMail.zimbra@redhat.com> <682acdbe-7624-14d6-36e0-e2dd4c6b771f@grimberg.me> <256ebbe9-d932-a826-977b-5a5cb8483755@redhat.com> From: Sagi Grimberg Message-ID: Date: Sun, 8 Apr 2018 13:36:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <256ebbe9-d932-a826-977b-5a5cb8483755@redhat.com> Content-Language: en-US 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 > Hi Sagi > > Still can reproduce this issue with the change: Thanks for validating Yi, Would it be possible to test the following: --- rq = blk_mq_get_request(q, NULL, op, &alloc_data); -- ... > [  153.384977] BUG: unable to handle kernel paging request at > 00003a9ed053bd48 > [  153.393197] IP: blk_mq_get_request+0x23e/0x390 Also would it be possible to provide gdb output of: l *(blk_mq_get_request+0x23e) Thanks, diff --git a/block/blk-mq.c b/block/blk-mq.c index 75336848f7a7..81ced3096433 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -444,6 +444,10 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, return ERR_PTR(-EXDEV); } cpu = cpumask_first_and(alloc_data.hctx->cpumask, cpu_online_mask); + if (cpu >= nr_cpu_ids) { + pr_warn("no online cpu for hctx %d\n", hctx_idx); + cpu = cpumask_first(alloc_data.hctx->cpumask); + } alloc_data.ctx = __blk_mq_get_ctx(q, cpu);