From: Ian Molton <ian@mnementh.co.uk>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-kernel@vger.kernel.org, drzeus-wbsd@drzeus.cx,
akpm@linux-foundation.org
Subject: Re: [PATCH 02/05] tmio_mmc: Fix use after free in remove()
Date: Wed, 11 Mar 2009 14:28:08 +0000 [thread overview]
Message-ID: <49B7CA78.9010807@mnementh.co.uk> (raw)
In-Reply-To: <20090311125903.1563.71042.sendpatchset@rx1.opensource.se>
Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Update the tmio_mmc code to call mmc_free_host() when
> done using the private data. Without this fix the driver
> frees memory and then keeps on using it as private data.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Ian Molton <ian@mnementh.co.uk>
> ---
>
> drivers/mmc/host/tmio_mmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 0010/drivers/mmc/host/tmio_mmc.c
> +++ work/drivers/mmc/host/tmio_mmc.c 2009-03-11 19:24:03.000000000 +0900
> @@ -650,10 +650,10 @@ static int __devexit tmio_mmc_remove(str
> if (mmc) {
> struct tmio_mmc_host *host = mmc_priv(mmc);
> mmc_remove_host(mmc);
> - mmc_free_host(mmc);
> free_irq(host->irq, host);
> iounmap(host->ctl);
> iounmap(host->cnf);
> + mmc_free_host(mmc);
> }
>
> return 0;
>
next prev parent reply other threads:[~2009-03-11 14:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 12:58 [PATCH 00/05] tmio_mmc: Minor fixes and cnf/irq changes Magnus Damm
2009-03-11 12:58 ` [PATCH 01/05] tmio_mmc: Fix one off, use resource_size() in probe() Magnus Damm
2009-03-11 14:26 ` Ian Molton
2009-03-11 12:59 ` [PATCH 02/05] tmio_mmc: Fix use after free in remove() Magnus Damm
2009-03-11 14:28 ` Ian Molton [this message]
2009-03-11 12:59 ` [PATCH 03/05] tmio_mmc: Break out cnf area operations Magnus Damm
2009-03-11 14:39 ` Ian Molton
2009-03-12 2:13 ` Magnus Damm
2009-03-11 12:59 ` [PATCH 04/05] tmio_mmc: Make cnf area optional Magnus Damm
2009-03-11 12:59 ` [PATCH 05/05] tmio_mmc: Support multiple interrupts Magnus Damm
2009-03-11 14:21 ` Ian Molton
2009-03-12 1:45 ` Magnus Damm
2009-03-16 18:30 ` [PATCH 00/05] tmio_mmc: Minor fixes and cnf/irq changes Pierre Ossman
2009-03-18 1:58 ` Magnus Damm
2009-03-24 2:07 ` Ian Molton
2009-03-25 8:56 ` Magnus Damm
2009-03-31 2:51 ` Magnus Damm
2009-03-31 18:37 ` Ian Molton
2009-04-01 2:20 ` Magnus Damm
2009-04-01 19:00 ` Ian Molton
2009-03-24 2:00 ` Ian Molton
2009-03-24 20:05 ` Pierre Ossman
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=49B7CA78.9010807@mnementh.co.uk \
--to=ian@mnementh.co.uk \
--cc=akpm@linux-foundation.org \
--cc=drzeus-wbsd@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox