[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171020061720.GN30097@localhost>
Date: Fri, 20 Oct 2017 11:47:20 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Alexander Kochetkov <al.kochet@...il.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Dan Williams <dan.j.williams@...el.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>
Subject: Re: [PATCH v2 1/2] dmaengine: pl330: fix descriptor allocation fail
On Wed, Oct 04, 2017 at 02:37:23PM +0300, Alexander Kochetkov wrote:
> If two concurrent threads call pl330_get_desc() when DMAC descriptor
> pool is empty it is possible that allocation for one of threads will fail
> with message:
>
> kernel: dma-pl330 20078000.dma-controller: pl330_get_desc:2469 ALERT!
>
> Here how that can happen. Thread A calls pl330_get_desc() to get
> descriptor. If DMAC descriptor pool is empty pl330_get_desc() allocates
> new descriptor on shared pool using add_desc() and then get newly
> allocated descriptor using pluck_desc(). At the same time thread B calls
> pluck_desc() and take newly allocated descriptor. In that case descriptor
> allocation for thread A will fail.
>
> Using on-stack pool for new descriptor allow avoid the issue described.
> The patch modify pl330_get_desc() to use on-stack pool for allocation
> new descriptors.
Applied, thanks
--
~Vinod
Powered by blists - more mailing lists