This is a note to let you know that I've just added the patch titled

    mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free()

to the 3.3-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mmc-cd-gpio-protect-against-null-context-in-mmc_cd_gpio_free.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 0e9f480bb553d39ee06ccd45639ba7a5446a7b81 Mon Sep 17 00:00:00 2001
From: Guennadi Liakhovetski <[email protected]>
Date: Tue, 24 Apr 2012 17:56:29 +0200
Subject: mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free()

From: Guennadi Liakhovetski <[email protected]>

commit 0e9f480bb553d39ee06ccd45639ba7a5446a7b81 upstream.

Do not oops, even if mmc_cd_gpio_free() is mistakenly called on a driver
cleanup path, even though a previous call to mmc_cd_gpio_request() failed.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
[stable@: please apply to 3.3-stable]
Signed-off-by: Chris Ball <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/mmc/core/cd-gpio.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/mmc/core/cd-gpio.c
+++ b/drivers/mmc/core/cd-gpio.c
@@ -67,6 +67,9 @@ void mmc_cd_gpio_free(struct mmc_host *h
 {
        struct mmc_cd_gpio *cd = host->hotplug.handler_priv;
 
+       if (!cd)
+               return;
+
        free_irq(host->hotplug.irq, host);
        gpio_free(cd->gpio);
        kfree(cd);


Patches currently in stable-queue which might be from [email protected] are

queue-3.3/mmc-cd-gpio-protect-against-null-context-in-mmc_cd_gpio_free.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to