lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 7 Aug 2015 11:34:31 +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

Thanks, I will test it shortly.

> @@ -2157,16 +2147,10 @@ static void sdhci_pre_req(struct mmc_host *mmc, struct mmc_request *mrq,
>  {
>  	struct sdhci_host *host = mmc_priv(mmc);
>  
> -	if (mrq->data->host_cookie) {
> -		mrq->data->host_cookie = 0;
> -		return;
> -	}
> +	mrq->data->host_cookie = COOKIE_UNMAPPED;

Just one question. Should we warn if host_cookie != COOKIE_UNMAPPED
instead of the assignment? In other words, if the assignment is
mandatory, it deserves a comment why.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ