]> git.baikalelectronics.ru Git - kernel.git/commit
of: overlay: detect cases where device tree may become corrupt
authorFrank Rowand <frank.rowand@sony.com>
Tue, 17 Oct 2017 23:36:26 +0000 (16:36 -0700)
committerRob Herring <robh@kernel.org>
Wed, 18 Oct 2017 01:47:14 +0000 (20:47 -0500)
commit9eddf70f4b68a8195855c154693c2c9e5d25db81
tree74f46e8ace25e756c8b26b9fa0b89907b21a78c6
parentda79b2f9ba874342b9d86a2621f73dbefd150218
of: overlay: detect cases where device tree may become corrupt

When an attempt to apply an overlay changeset fails, an effort
is made to revert any partial application of the changeset.
When an attempt to remove an overlay changeset fails, an effort
is made to re-apply any partial reversion of the changeset.

The existing code does not check for failure to recover a failed
overlay changeset application or overlay changeset revert.

Add the missing checks and flag the devicetree as corrupt if the
state of the devicetree can not be determined.

Improve and expand the returned errors to more fully reflect the
result of the effort to undo the partial effects of a failed attempt
to apply or remove an overlay changeset.

If the device tree might be corrupt, do not allow further attempts
to apply or remove an overlay changeset.

When creating an overlay changeset from an overlay device tree,
add some additional warnings if the state of the overlay device
tree is not as expected.

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c
drivers/of/dynamic.c
drivers/of/of_private.h
drivers/of/overlay.c
drivers/of/unittest.c
include/linux/of.h