[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 5 May 2017 11:32:23 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Seung-Woo Kim <sw0312.kim@...sung.com>,
Mark Brown <broonie@...nel.org>,
Amit Pundir <amit.pundir@...aro.org>
Subject: [PATCH 3.18 38/68] regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
3.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Seung-Woo Kim <sw0312.kim@...sung.com>
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.
Signed-off-by: Seung-Woo Kim <sw0312.kim@...sung.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Amit Pundir <amit.pundir@...aro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/regulator/core.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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--;
}
Powered by blists - more mailing lists