dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: od@zcrc.me, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Artur Rojek <contact@artur-rojek.eu>
Subject: Re: [PATCH] dma: dma-jz4780: Fix race in jz4780_dma_tx_status
Date: Mon, 5 Oct 2020 09:57:47 +0530	[thread overview]
Message-ID: <20201005042747.GC2968@vkoul-mobl> (raw)
In-Reply-To: <20201004140307.885556-1-paul@crapouillou.net>

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

      reply	other threads:[~2020-10-05  4:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-04 14:03 [PATCH] dma: dma-jz4780: Fix race in jz4780_dma_tx_status Paul Cercueil
2020-10-05  4:27 ` Vinod Koul [this message]

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=20201005042747.GC2968@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=contact@artur-rojek.eu \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=paul@crapouillou.net \
    --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;
as well as URLs for NNTP newsgroup(s).