[PATCH] fix dmaengine_unmap failure.

Xuelin Shi xuelin.shi at freescale.com
Thu Mar 20 17:34:59 EST 2014


Hi Dan,

I'm OK to save memory here. I'd like to send v2.

Thanks,
Xuelin Shi

-----Original Message-----
From: Dan Williams [mailto:dan.j.williams at intel.com] 
Sent: 2014年3月19日 23:44
To: Shi Xuelin-B29237
Cc: Vinod Koul; linuxppc-dev; dmaengine at vger.kernel.org
Subject: Re: [PATCH] fix dmaengine_unmap failure.

On Tue, Mar 18, 2014 at 11:39 PM, Xuelin Shi <xuelin.shi at freescale.com> wrote:
> Hi Dan,
>
> In async_mult(...) of async_raid6_recov.c, the count 3 is used to request an unmap.
> However the to_cnt and bidi_cnt are both set to 1 and from_cnt to 0.
> Then while trying to do unmap, we are getting the wrong "unmap" from a different mempool.
>
> In this patch, the mempool is associated with the unmap structure instead of computing it again.
> By this way, it is guaranteed that the unmap is the same when we get and put the unmap data.
>
> BTW: the mempool is just used to manage the struct unmap, not the pages.
>

I see, what about just storing the map_cnt at allocation time?  It could be another byte in struct dmaengine_unmap_data rather than an 8 byte pointer.




More information about the Linuxppc-dev mailing list