]> git.baikalelectronics.ru Git - kernel.git/commit
of: fix race between search and remove in of_update_property()
authorXiubo Li <Li.Xiubo@freescale.com>
Thu, 17 Apr 2014 07:48:29 +0000 (15:48 +0800)
committerGrant Likely <grant.likely@linaro.org>
Thu, 22 May 2014 23:46:30 +0000 (08:46 +0900)
commit348eefca497a81d2b4c7a70d22495d14d63c863f
tree6fa7dd2901226991fe0f4c34e52a448f036a79a6
parent0d1ae46ff37878af2b84d3e11e9e3ee64b317ca6
of: fix race between search and remove in of_update_property()

The of_update_property() is intented to update a property in a node
and if the property does not exist, will add it.

The second search of the property is possibly won't be found, that
maybe removed by other thread just before the second search begain.

Using the __of_find_property() and __of_add_property() instead and
move them into lock operations.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
[grant.likely: conflict with another change in same function]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/base.c