Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1081069imu; Tue, 20 Nov 2018 11:20:12 -0800 (PST) X-Google-Smtp-Source: AJdET5fxmgMbu4H8tfG+D/1pTFtkFwDd6x0GmXgDHxq1k+Q1kyIT4XBG56lI65vb73S/SrLhQMhV X-Received: by 2002:a62:5e46:: with SMTP id s67-v6mr3615495pfb.122.1542741612157; Tue, 20 Nov 2018 11:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542741612; cv=none; d=google.com; s=arc-20160816; b=d2/5XS57ESmZFcSHNtj3cxwK8+RcZMdOU/yaAwpj2k7s2yLO8eI1oGT3wJiN7JdYLh dzweMDBxStL2tLBpY5LeM85icZupmfNApuFvpuMf5DHPJcJNqv/l7gG0fhIbS5ijym6C 389cukrGofjLDs/bYTjFOXInw0i2FQj7RHcXwQYrRevR2Gk96cvX7QeQL1K6LjS5QEFk PYn5xI6K0hF4KKNJ2vn4pPabbY8UOWeWBmkiEozi6p22EpAH6MIiTgi43FjpCn2F99Z2 hxteGCix4ysvR3ZGakhG3/fqQth0sYdpXrv+9OqtfVatNwjtPQNelNmS93Q2z8/Mmc6x p13w== 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=UPNBZEwLzwI3eXesfdNU2FmU0BtDALl93lhcgMP3DZU=; b=sjgKn4GsXsShJ+STtSEAJgV1CBc/ybkWw15f5mTjfUefMxoE5P89I0qtKCxXwQnITW nYYe97VUV3vml9wb8x1m5D9dY06KPuhmtVefkMnRq7B6TC9yE0I1ciAooSmaUAhXJKnu FpEusXdQYbe0Lyo7wgyejrl64kLt6EzoGmRGRJfcN13DorVrES5yF63JaahhkXlB3gh1 z/5fCW0Pw5fE6PzIKxI7/46V9709VkavspCxpQvPQfw2ilGclZqBbNXyPF5jryxrW7oT a+HMFMtR4QPFtZvq0X3yG2nzO0lZ6rO0fGK1ppF0suPOBmuYeAqYKgw8IEp4AqbCMc1W RF1Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si43552256pgp.135.2018.11.20.11.19.56; Tue, 20 Nov 2018 11:20:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbeKUChq (ORCPT + 99 others); Tue, 20 Nov 2018 21:37:46 -0500 Received: from verein.lst.de ([213.95.11.211]:46087 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbeKUChq (ORCPT ); Tue, 20 Nov 2018 21:37:46 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id C597D68BDF; Tue, 20 Nov 2018 17:07:53 +0100 (CET) Date: Tue, 20 Nov 2018 17:07:53 +0100 From: Christoph Hellwig To: Robin Murphy Cc: hch@lst.de, konrad.wilk@oracle.com, m.szyprowski@samsung.com, john.stultz@linaro.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] swiotlb: Skip cache maintenance on map error Message-ID: <20181120160753.GB2492@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 02:09:53PM +0000, Robin Murphy wrote: > If swiotlb_bounce_page() failed, calling arch_sync_dma_for_device() may > lead to such delights as performing cache maintenance on whatever > address phys_to_virt(SWIOTLB_MAP_ERROR) looks like, which is typically > outside the kernel memory map and goes about as well as expected. > > Don't do that. > > Fixes: a4a4330db46a ("swiotlb: add support for non-coherent DMA") > Signed-off-by: Robin Murphy Looks good, Reviewed-by: Christoph Hellwig