Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp887919pxb; Wed, 27 Oct 2021 14:30:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcrwaL1N1aupL513GjU4anqocBV7nYaptgvJ2fZWn0KCCtoaX7YjppxpizSguVZ3KYb1iD X-Received: by 2002:a17:907:16a1:: with SMTP id hc33mr83287ejc.137.1635370229956; Wed, 27 Oct 2021 14:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370229; cv=none; d=google.com; s=arc-20160816; b=pAu+c0qqaqGWiY3l6toWUdp6d+J5A+tVknV7gjq0dGX2wDKoC9JEZunKQgyZ5CB0G/ XhA7kX7MwkAfblXGGBg04+jYpT1tdF6AzQLJ6pVMIFUYnKC0AvhEa73K8Diz7o9b9WjG HFJewtcriAlJAwxUZObYc3mpzNyeDiKQktOt2F4XuOvA/cVnGZrJZy8HQ0YF3htedDpG Cw/egcIIeQ4Y+69vNxN9+RYg2k17tlloJ5OAoy068C9+4RFUSWaAgOhsduw8sQD/oOWt tMmGE3gC4I4+TjWKVXxRM1WDJcF51ULc/M/5mDGKaLmY7V3Kgfs1QJvNsbSPX7qcEoS8 Sl2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:dkim-signature; bh=pmjG/w9KCFogpcwmZfTMs+jpYYxMw7C07k2WYJPP/Wg=; b=FwMGYeiracu9TsIm/X7BVRPUN2QIX7TadXv6Xek3JniRLQbwJDzGkxAbArleGQEVx8 JZl/jkHg18RoBU3hjFslH+AWuabhXszNfuugTy0m7GDLxD5ubve6WpVe6wYp97kPgPbo V5upvJps62CaKY8jwNlk5VHwfvtlPz0S1CQTEvpM3XW0KaS25VOjAi5AVuSAqI0afbzi ZaHD5mIHlWGbvK+5eO/XRen5n5eF7CnrUSHez+tV5NPYV05hmAFPyJO3GTdmt1b8t7Z4 gb8tdxqQctVyzdjIhuogN01Pxi2HmIJg5rSEUy1KK3Aus6kRn1gK9aGZFioxFbfNCfsT yTeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=IDsB7W6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z13si1335391edc.73.2021.10.27.14.30.06; Wed, 27 Oct 2021 14:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=IDsB7W6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239690AbhJ0QoU (ORCPT + 97 others); Wed, 27 Oct 2021 12:44:20 -0400 Received: from ale.deltatee.com ([204.191.154.188]:58398 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233805AbhJ0QoT (ORCPT ); Wed, 27 Oct 2021 12:44:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:cc:content-disposition; bh=pmjG/w9KCFogpcwmZfTMs+jpYYxMw7C07k2WYJPP/Wg=; b=IDsB7W6HOLVGj26AXLzaTju8k7 /SkRM4ou8KT3q3l+C4mb/9LMD9cmlDW38b7v7ewZ+iyYLdA6Z7J9WU21YmAwjkRMDwup8PaxTjQV9 +vC7Dsh3Q9RhFKDvONgowJDfqAGDdpfryBcEOvayqdyNHlrauWeHFQ9JvYmUHamxbN2iViKpjNklt QcIv7N9SdBsMEtuOC/z/d04snokfLqgO6iKQMEcunent+teB0aQl2Iyt8DFnFEqO7ci8TRhKPw3s/ p5Dus1AfQCYJWJq3ezuxry15lcIQX8nr6IolQg5g7aURNHQ4yFdpaLHtLfLu/MSjRA2Nirv4Tuz5C F/d17mHA==; Received: from s0106a84e3fe8c3f3.cg.shawcable.net ([24.64.144.200] helo=[192.168.0.10]) by ale.deltatee.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mflzr-000k0W-Kd; Wed, 27 Oct 2021 10:41:52 -0600 To: Marshall Midden , joro@8bytes.org, will@kernel.org, linux-kernel@vger.kernel.org References: From: Logan Gunthorpe Message-ID: Date: Wed, 27 Oct 2021 10:41:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.64.144.200 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, will@kernel.org, joro@8bytes.org, marshallmidden@gmail.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-9.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: v5.15-rc7 AMD no kernel dump, spews "scsi_dma_map failed: request for 36 bytes!" X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2021-10-27 10:08 a.m., Marshall Midden wrote: > v5.15-rc7 AMD no kernel dump, spews "scsi_dma_map failed: request for 36 bytes!" > > With v5.15-rc (1 through 7), AMD processor kernel crash dumps do not occur, > instead spews: > "scsci_dma_map failed: request for 36 bytes!" > Works on Intel machines, and in v5.14.0 (and v5.14.14) - as well as previous > kernels (down to v5.3.x.) > git bisect torvalds repository shows: dabb16f67215918c48cf3ff1fc4bc36ca421da2b > Reverse patch to tag v5.15-rc7 allows kernel crash dumps to occur/happen. > On careful review I think I see what might be causing this. Can you please try the following patch? Thanks, Logan -- diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index cd0f1a593997..3bfb5da87802 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -1028,7 +1028,8 @@ static int iommu_dma_map_sg(struct device *dev, struct sc> if (static_branch_unlikely(&iommu_deferred_attach_enabled)) { ret = iommu_deferred_attach(dev, domain); - goto out; + if (ret) + goto out; } if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))