Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7252089imu; Tue, 22 Jan 2019 03:00:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN4r1sDoCyFSsMrwCcw7dYjMbEpI+28LYw6If/U/uhKly+m10V+lFYdVsKkiGU+EVt0k3ggS X-Received: by 2002:a62:d206:: with SMTP id c6mr3597280pfg.245.1548154802623; Tue, 22 Jan 2019 03:00:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548154802; cv=none; d=google.com; s=arc-20160816; b=cqYSHuEES8bZW1rCkFmLhtAdtC01d6KrJgfrABjcXMlGXX3rYUFA0ZZKRWa1zcI7ju /UMu6UdUDRuF+kPdYWW9+fVa89XGKC4Xu6cK22A8nFDB8O7NACuQB1ER33U/U13xcvzl UNzdbGKBeSDOTQ/vo39IFdpo6mMt63WimWk5gkIfAjyMFfborMSHVEXdSWEfHWAX81DR 01IKwM2feJdmjqD7WJHTeFxUxo7XLInFN74v+FkDMq95D9KYdgeY1p/3GAFi+qnG58zC G6uNTnaCgD64s9h8ikuUK2/zFdDZsSYU3CGu9ocYFOkmVs1q3lBl54vH+EAzmZd9wFDo XuqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rC96JkA8GZoDaIPOjFq1ighFOIzK3LVYtCZqNwyeOj8=; b=tmdOycrEWl5QeoQjvj6BI7r83S/uhFFiOO8LthPLh3RibZRyeycPhIdYdFSTQZjNBo AWfMGP6LkXWxT6nd1k34+cMl2uSLnhuyjiCqaBlzBH+C8P7N9HDSYAwD5r0No0RT4Z2o Ulk6llBuy7gAWABZISRIuDDIMpAsBj4wMQNhe1UzRup+cnaWSeiOtDlVIPQBjwxOjKOa 9tHxhpvDd2xbmPucXNgfp7wjvEyAB68HC6R5NLlAfn9KLVvZi7tEysnqWTyWz0Xx1PLl V3aN4mm0P0U48XH1f7jeAIHrmaX0pRvrgLOtYlg6Au6xo1fEJupc/JF+yHvkSR7JtGE0 I+Mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si6888931pll.439.2019.01.22.02.59.46; Tue, 22 Jan 2019 03:00:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727971AbfAVK5u (ORCPT + 99 others); Tue, 22 Jan 2019 05:57:50 -0500 Received: from 8bytes.org ([81.169.241.247]:58784 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfAVK5t (ORCPT ); Tue, 22 Jan 2019 05:57:49 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id B2CD653D; Tue, 22 Jan 2019 11:57:48 +0100 (CET) Date: Tue, 22 Jan 2019 11:57:47 +0100 From: Joerg Roedel To: Jerry Snitselaar Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Suravee Suthikulpanit Subject: Re: [PATCH] iommu: amd: call free_iova_fast with pfn in map_sg Message-ID: <20190122105747.qnelpj6xx6gp5dh7@8bytes.org> References: <20190117192902.15158-1-jsnitsel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190117192902.15158-1-jsnitsel@redhat.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 12:29:02PM -0700, Jerry Snitselaar wrote: > In the error path of map_sg, free_iova_fast is being called with > address instead of the pfn. This results in a bad value getting into > the rcache, and can result in hitting a BUG_ON when > iova_magazine_free_pfns is called. > > Cc: Joerg Roedel > Cc: Suravee Suthikulpanit > Signed-off-by: Jerry Snitselaar Applied, thanks.