pinctrl: protect pinctrl_list add
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 4 Feb 2014 08:07:09 +0000 (09:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Feb 2014 19:08:02 +0000 (11:08 -0800)
commit592d4de3803f242aebc6ea4033f752ce1bf846a7
treeebf9bf7bc52a156c8b3184b840d7c4c79884bed8
parentc2ffc4ef1c6436ac97af8a41ec01be905e4ba510
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@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/core.c