All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Haibo Chen <haibo.chen@freescale.com>, ulf.hansson@linaro.org
Cc: adrian.hunter@intel.com, aisheng.dong@freescale.com,
	shawn.guo@linaro.org, stable@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: sdhci: fix dma memory leak in sdhci_pre_req()
Date: Fri, 7 Aug 2015 13:05:53 +0200	[thread overview]
Message-ID: <55C49111.9080505@suse.cz> (raw)
In-Reply-To: <1438939790-28310-1-git-send-email-haibo.chen@freescale.com>

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@vger.kernel.org # 4.0+
> Reported-by: Jiri Slaby <jslaby@suse.cz>

Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>

I also added the mentioned WARN_ON in place and it never triggerred. (As
I expected...)

Thanks!

-- 
js
suse labs

  parent reply	other threads:[~2015-08-07 11:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  9:29 [PATCH] mmc: sdhci: fix dma memory leak in sdhci_pre_req() Haibo Chen
2015-08-07  9:29 ` Haibo Chen
2015-08-07  9:34 ` Jiri Slaby
2015-08-07 11:05 ` Jiri Slaby [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-08-25  2:02 Haibo Chen
2015-08-25  2:02 ` Haibo Chen
2015-08-25 12:05 ` Ulf Hansson

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=55C49111.9080505@suse.cz \
    --to=jslaby@suse.cz \
    --cc=adrian.hunter@intel.com \
    --cc=aisheng.dong@freescale.com \
    --cc=haibo.chen@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=stable@vger.kernel.org \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.