Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1479912 > unrolled thread
| Started by | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| First post | 2016-09-09 13:50 +0200 |
| Last post | 2016-09-09 15:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] dmaengine: pl330: use lock of dma channel in pl330_update Vinod Koul <vinod.koul@intel.com> - 2016-09-09 13:50 +0200
Re: [PATCH] dmaengine: pl330: use lock of dma channel in pl330_update Hsin-yu Chao <hychao@chromium.org> - 2016-09-09 15:00 +0200
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2016-09-09 13:50 +0200 |
| Subject | Re: [PATCH] dmaengine: pl330: use lock of dma channel in pl330_update |
| Message-ID | <sfstI-2h0-25@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Hsin-yu Chao <hychao@chromium.org> |
|---|---|
| Date | 2016-09-09 15:00 +0200 |
| Message-ID | <sftzr-2Vd-13@gated-at.bofh.it> |
| In reply to | #1479912 |
It turns out this patch could cause lock dependency issue.
The other patch "Acquire dmac's spinlock in pl330_tx_status" that I've
uploaded is the correct fix to replace this one.
Thanks,
Hsin-yu
On Fri, Sep 9, 2016 at 7:48 PM, Vinod Koul <vinod.koul@intel.com> wrote:
> 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web