[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55C49111.9080505@suse.cz>
Date: Fri, 7 Aug 2015 13:05:53 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: Haibo Chen <haibo.chen@...escale.com>, ulf.hansson@...aro.org
Cc: adrian.hunter@...el.com, aisheng.dong@...escale.com,
shawn.guo@...aro.org, stable@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: sdhci: fix dma memory leak in sdhci_pre_req()
On 08/07/2015, 11:29 AM, Haibo Chen wrote:
> Currently one mrq->data maybe execute dma_map_sg() twice
> when mmc subsystem prepare over one new request, and the
> following log show up:
> sdhci[sdhci_pre_dma_transfer] invalid cookie: 24, next-cookie 25
>
> In this condition, mrq->date map a dma-memory(1) in sdhci_pre_req
> for the first time, and map another dma-memory(2) in sdhci_prepare_data
> for the second time. But driver only unmap the dma-memory(2), and
> dma-memory(1) never unmapped, which cause the dma memory leak issue.
>
> This patch use another method to map the dma memory for the mrq->data
> which can fix this dma memory leak issue.
>
> Fixes: commit 348487cb28e66b0 ("mmc: sdhci: use pipeline mmc requests to improve performance")
> Cc: stable@...r.kernel.org # 4.0+
> Reported-by: Jiri Slaby <jslaby@...e.cz>
Reported-and-tested-by: Jiri Slaby <jslaby@...e.cz>
I also added the mentioned WARN_ON in place and it never triggerred. (As
I expected...)
Thanks!
--
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists