From: Vinod Koul <vinod.koul@intel.com>
To: Hsin-Yu Chao <hychao@chromium.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
"open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM"
<dmaengine@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: pl330: use lock of dma channel in pl330_update
Date: Fri, 9 Sep 2016 17:18:40 +0530 [thread overview]
Message-ID: <20160909114840.GO9355@localhost> (raw)
In-Reply-To: <1471611828-15548-1-git-send-email-hychao@chromium.org>
On Fri, Aug 19, 2016 at 09:03:48PM +0800, Hsin-Yu Chao wrote:
> The content of pl330_thread could be modified in pl330_update
> without protection by the lock from the dma channel who currently
> holding this thread. This could cause bug to the calculation of
> in pl330_tx_status, if the running request has just been done and
> moving to next request while calculating the residual number, an
> invalid number from BUSY descriptor could be added up.
> ---
> drivers/dma/pl330.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 31e9c49..2449cb7 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -1564,6 +1564,19 @@ static void pl330_dotask(unsigned long data)
> return;
> }
>
> +static struct dma_pl330_chan *get_dma_channel(struct pl330_dmac *pl330,
> + struct pl330_thread *thrd)
> +{
> + struct dma_pl330_chan *pch;
> + int i;
empty line here please
--
~Vinod
next prev parent reply other threads:[~2016-09-09 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 13:03 [PATCH] dmaengine: pl330: use lock of dma channel in pl330_update Hsin-Yu Chao
2016-09-09 11:48 ` Vinod Koul [this message]
2016-09-09 12:54 ` Hsin-yu Chao
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=20160909114840.GO9355@localhost \
--to=vinod.koul@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=hychao@chromium.org \
--cc=linux-kernel@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