Skip to contentSkip to conversation

Patch "regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing" has been added to the 3.18-stable tree

PATCH [email protected] 1 participant 1 message May 4, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing

to the 3.18-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:
regulator-core-fix-regualtor_ena_gpio_free-not-to-access-pin-after-freeing.patch
and it can be found in the queue-3.18 subdirectory.

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

Quoted 1 line

From 60a2362f769cf549dc466134efe71c8bf9fbaaba Mon Sep 17 00:00:00 2001

From: Seung-Woo Kim <[email protected]>
Date: Thu, 4 Dec 2014 19:17:17 +0900
Subject: regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing

From: Seung-Woo Kim <[email protected]>

commit 60a2362f769cf549dc466134efe71c8bf9fbaaba upstream.

After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing.

---
 drivers/regulator/core.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/regulator/core.c +2 -0
@@ -1720,6 +1720,8 @@ static void regulator_ena_gpio_free(stru
 				gpiod_put(pin->gpiod);
 				list_del(&pin->list);
 				kfree(pin);
+				rdev->ena_pin = NULL;
+				return;
 			} else {
 				pin->request_count--;
 			}

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

queue-3.18/regulator-core-fix-regualtor_ena_gpio_free-not-to-access-pin-after-freeing.patch