[3.11.y.z extended stable] Patch "pinctrl: protect pinctrl_list add" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Fri Feb 14 10:11:11 UTC 2014
This is a note to let you know that I have just added a patch titled
pinctrl: protect pinctrl_list add
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 8ff4c0895f35a49decb6ef882d3b34286b1ac94f Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <sgruszka at redhat.com>
Date: Tue, 4 Feb 2014 09:07:09 +0100
Subject: pinctrl: protect pinctrl_list add
commit 7b320cb1ed2dbd2c5f2a778197baf76fd6bf545a upstream.
We have few fedora bug reports about list corruption on pinctrl,
for example:
https://bugzilla.redhat.com/show_bug.cgi?id=1051918
Most likely corruption happen due lack of protection of pinctrl_list
when adding new nodes to it. Patch corrects that.
Fixes: 42fed7ba44e ("pinctrl: move subsystem mutex to pinctrl_dev struct")
Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
Acked-by: Stephen Warren <swarren at nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/pinctrl/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 2a00239..dbcf284 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -827,7 +827,9 @@ static struct pinctrl *create_pinctrl(struct device *dev)
kref_init(&p->users);
/* Add the pinctrl handle to the global list */
+ mutex_lock(&pinctrl_list_mutex);
list_add_tail(&p->node, &pinctrl_list);
+ mutex_unlock(&pinctrl_list_mutex);
return p;
}
--
1.8.3.2
More information about the kernel-team
mailing list