From: Andrew Morton <akpm@linux-foundation.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kyungmin.park@samsung.com,
kgene.kim@samsung.com, ben-linux@fluff.org,
w.sang@pengutronix.de
Subject: Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove
Date: Thu, 23 Sep 2010 12:08:03 -0700 [thread overview]
Message-ID: <20100923120803.832975f6.akpm@linux-foundation.org> (raw)
In-Reply-To: <1285251725-6210-1-git-send-email-m.szyprowski@samsung.com>
On Thu, 23 Sep 2010 16:22:05 +0200
Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> If not all clocks has been defined in platform data, driver will cause
> a null pointer dereference when it is being removed. This patch fixes
> this issue.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mmc/host/sdhci-s3c.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 71ad416..757d92c 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -481,8 +481,10 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
> sdhci_remove_host(host, 1);
>
> for (ptr = 0; ptr < 3; ptr++) {
> - clk_disable(sc->clk_bus[ptr]);
> - clk_put(sc->clk_bus[ptr]);
> + if (sc->clk_bus[ptr]) {
> + clk_disable(sc->clk_bus[ptr]);
> + clk_put(sc->clk_bus[ptr]);
> + }
> }
> clk_disable(sc->clk_io);
> clk_put(sc->clk_io);
The patch applies OK to 2.6.35. Is the bug present there as well? If
so, should we fix it in earlier kernels? If so then the way in which
we indicate this is by adding
Cc: <stable@kernel.org>
to the changelog.
next prev parent reply other threads:[~2010-09-23 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 14:22 [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove Marek Szyprowski
2010-09-23 19:08 ` Andrew Morton [this message]
2010-09-25 22:53 ` Chris Ball
2010-09-26 10:53 ` Kyungmin Park
2010-09-26 15:25 ` Chris Ball
2010-09-27 6:09 ` Marek Szyprowski
2010-09-23 19:12 ` Chris Ball
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=20100923120803.832975f6.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ben-linux@fluff.org \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=w.sang@pengutronix.de \
/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