From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6A04C433E3 for ; Fri, 14 Aug 2020 13:40:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0A8620885 for ; Fri, 14 Aug 2020 13:40:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727908AbgHNNkL (ORCPT ); Fri, 14 Aug 2020 09:40:11 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2607 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726139AbgHNNkK (ORCPT ); Fri, 14 Aug 2020 09:40:10 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 7163B571FFE3D7393BC5; Fri, 14 Aug 2020 14:40:08 +0100 (IST) Received: from [127.0.0.1] (10.47.4.107) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 14 Aug 2020 14:40:07 +0100 Subject: Re: nvme crash - Re: linux-next: Tree for Aug 13 From: John Garry To: Christoph Hellwig CC: linux-nvme , Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , , Robin Murphy , References: <20200813155009.GA2303@infradead.org> <81e42d30-ede3-d7b0-ad7b-8192bcf27a4c@huawei.com> <20200814120824.GB1872@infradead.org> <895b0c2f-52eb-bd72-7cbf-aa6808c018d2@huawei.com> Message-ID: <4f01dd86-62da-84bd-0ae4-7e31b5484514@huawei.com> Date: Fri, 14 Aug 2020 14:37:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <895b0c2f-52eb-bd72-7cbf-aa6808c018d2@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.4.107] X-ClientProxiedBy: lhreml726-chm.china.huawei.com (10.201.108.77) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/08/2020 14:07, John Garry wrote: > > BTW, as for the DMA/sg scatterlist code, it so happens in this case that > we try the dma alloc for size=0 in nvme_alloc_queue() - I know an > allocation for size=0 makes no sense, but couldn't we bit a bit more > robust? it's giving ZERO_SIZE_PTR, which we deference, so ignore me... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AC79C433E1 for ; Fri, 14 Aug 2020 13:40:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A1342068E for ; Fri, 14 Aug 2020 13:40:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i+b45hjp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A1342068E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sdIs+o54cALecEigR1MklNseZGXJBljk/kwE6vJojrs=; b=i+b45hjpO1DkxQILRJOBhkbPu 6LRVz+N4V+4LEXKdFMaraR8k53XEVlRJEQqodUYNPJupneoHOr2jxL2hap2Wu8Oaoo0E/qm2yDCV4 d9fklJDXvim+6VATqdVrTkctwe5svunS0Gnv52Fx7s+R19zjrSEvi2nzfAi06IMk8QmSf4xUOqXSG wLVXe0XoW4bPdsbVOEEdW0Bc01Wg+OUBMaoXhJi4wmP/5VA3GZx6tnA+bpuQzAMLchFdUMEBvRIyq zABSiwbMHfQ/YRWNLeFM9plW7Ccv1/lY2U9JOf7W/XjNmW0b9rf0AJ53VXVF0i0bsv+JnYsPtSrM5 yW7SWRYwQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6ZwN-0002gU-O3; Fri, 14 Aug 2020 13:40:16 +0000 Received: from lhrrgout.huawei.com ([185.176.76.210] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6ZwK-0002fV-MB for linux-nvme@lists.infradead.org; Fri, 14 Aug 2020 13:40:13 +0000 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 7163B571FFE3D7393BC5; Fri, 14 Aug 2020 14:40:08 +0100 (IST) Received: from [127.0.0.1] (10.47.4.107) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 14 Aug 2020 14:40:07 +0100 Subject: Re: nvme crash - Re: linux-next: Tree for Aug 13 From: John Garry To: Christoph Hellwig References: <20200813155009.GA2303@infradead.org> <81e42d30-ede3-d7b0-ad7b-8192bcf27a4c@huawei.com> <20200814120824.GB1872@infradead.org> <895b0c2f-52eb-bd72-7cbf-aa6808c018d2@huawei.com> Message-ID: <4f01dd86-62da-84bd-0ae4-7e31b5484514@huawei.com> Date: Fri, 14 Aug 2020 14:37:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <895b0c2f-52eb-bd72-7cbf-aa6808c018d2@huawei.com> Content-Language: en-US X-Originating-IP: [10.47.4.107] X-ClientProxiedBy: lhreml726-chm.china.huawei.com (10.201.108.77) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200814_094012_910960_F16BF1AF X-CRM114-Status: GOOD ( 10.94 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , chaitanya.kulkarni@wdc.com, Linux Kernel Mailing List , linux-nvme , iommu@lists.linux-foundation.org, Linux Next Mailing List , Robin Murphy Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On 14/08/2020 14:07, John Garry wrote: > > BTW, as for the DMA/sg scatterlist code, it so happens in this case that > we try the dma alloc for size=0 in nvme_alloc_queue() - I know an > allocation for size=0 makes no sense, but couldn't we bit a bit more > robust? it's giving ZERO_SIZE_PTR, which we deference, so ignore me... _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9289EC433DF for ; Fri, 14 Aug 2020 13:40:15 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F9102068E for ; Fri, 14 Aug 2020 13:40:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F9102068E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 193E7260CA; Fri, 14 Aug 2020 13:40:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d-x1pztCTNB2; Fri, 14 Aug 2020 13:40:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id B3CD1260B1; Fri, 14 Aug 2020 13:40:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9B284C07FF; Fri, 14 Aug 2020 13:40:13 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id E98BCC004D for ; Fri, 14 Aug 2020 13:40:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D945888C7F for ; Fri, 14 Aug 2020 13:40:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wYh+w5EhuPGi for ; Fri, 14 Aug 2020 13:40:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) by hemlock.osuosl.org (Postfix) with ESMTPS id D467C88C6C for ; Fri, 14 Aug 2020 13:40:10 +0000 (UTC) Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 7163B571FFE3D7393BC5; Fri, 14 Aug 2020 14:40:08 +0100 (IST) Received: from [127.0.0.1] (10.47.4.107) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 14 Aug 2020 14:40:07 +0100 Subject: Re: nvme crash - Re: linux-next: Tree for Aug 13 From: John Garry To: Christoph Hellwig References: <20200813155009.GA2303@infradead.org> <81e42d30-ede3-d7b0-ad7b-8192bcf27a4c@huawei.com> <20200814120824.GB1872@infradead.org> <895b0c2f-52eb-bd72-7cbf-aa6808c018d2@huawei.com> Message-ID: <4f01dd86-62da-84bd-0ae4-7e31b5484514@huawei.com> Date: Fri, 14 Aug 2020 14:37:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <895b0c2f-52eb-bd72-7cbf-aa6808c018d2@huawei.com> Content-Language: en-US X-Originating-IP: [10.47.4.107] X-ClientProxiedBy: lhreml726-chm.china.huawei.com (10.201.108.77) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Cc: Stephen Rothwell , chaitanya.kulkarni@wdc.com, Linux Kernel Mailing List , linux-nvme , iommu@lists.linux-foundation.org, Linux Next Mailing List , Robin Murphy X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 14/08/2020 14:07, John Garry wrote: > > BTW, as for the DMA/sg scatterlist code, it so happens in this case that > we try the dma alloc for size=0 in nvme_alloc_queue() - I know an > allocation for size=0 makes no sense, but couldn't we bit a bit more > robust? it's giving ZERO_SIZE_PTR, which we deference, so ignore me... _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu