[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201005042747.GC2968@vkoul-mobl>
Date: Mon, 5 Oct 2020 09:57:47 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Paul Cercueil <paul@...pouillou.net>
Cc: od@...c.me, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Artur Rojek <contact@...ur-rojek.eu>
Subject: Re: [PATCH] dma: dma-jz4780: Fix race in jz4780_dma_tx_status
On 04-10-20, 16:03, Paul Cercueil wrote:
> The jz4780_dma_tx_status() function would check if a channel's cookie
> state was set to 'completed', and if not, it would enter the critical
> section. However, in that time frame, the jz4780_dma_chan_irq() function
> was able to set the cookie to 'completed', and clear the jzchan->vchan
> pointer, which was deferenced in the critical section of the first
> function.
>
> Fix this race by checking the channel's cookie state after entering the
> critical function and not before.
Applied, thanks
--
~Vinod
Powered by blists - more mailing lists