public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Christoph Hellwig <hch@lst.de>,
	Paul Burton <paul.burton@mips.com>,
	iommu@lists.linux-foundation.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation
Date: Thu, 1 Nov 2018 09:33:46 +0100	[thread overview]
Message-ID: <20181101083346.GA7136@lst.de> (raw)
In-Reply-To: <alpine.LFD.2.21.1811010523440.20378@eddie.linux-mips.org>

On Thu, Nov 01, 2018 at 07:54:24AM +0000, Maciej W. Rozycki wrote:
> Fix a MIPS `dma_alloc_coherent' regression from commit bc3ec75de545 
> ("dma-mapping: merge direct and noncoherent ops") that causes a cached 
> allocation to be returned on noncoherent cache systems.
> 
> This is due to an inverted check now used in the MIPS implementation of 
> `arch_dma_alloc' on the result from `dma_direct_alloc_pages' before 
> doing the cached-to-uncached mapping of the allocation address obtained.  
> The mapping has to be done for a non-NULL rather than NULL result, 
> because a NULL result means the allocation has failed.
> 
> Invert the check for correct operation then.
> 
> Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
> Fixes: bc3ec75de545 ("dma-mapping: merge direct and noncoherent ops")
> Cc: stable@vger.kernel.org # 4.19+

Oops, yes this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2018-11-01 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180914095808.22202-1-hch@lst.de>
     [not found] ` <20180914095808.22202-5-hch@lst.de>
     [not found]   ` <alpine.LFD.2.21.1810311414200.20378@eddie.linux-mips.org>
     [not found]     ` <alpine.LFD.2.21.1810311559590.20378@eddie.linux-mips.org>
     [not found]       ` <20181031203206.GA28337@lst.de>
     [not found]         ` <alpine.LFD.2.21.1810312043250.20378@eddie.linux-mips.org>
     [not found]           ` <20181101051359.GA4164@lst.de>
2018-11-01  7:54             ` [PATCH] MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation Maciej W. Rozycki
2018-11-01  8:33               ` Christoph Hellwig [this message]
2018-11-01 14:30                 ` Maciej W. Rozycki
2018-11-05 18:10               ` Paul Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181101083346.GA7136@lst.de \
    --to=hch@lst.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=m.szyprowski@samsung.com \
    --cc=macro@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=robin.murphy@arm.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox