kernel_optimize_test/drivers/of
Frank Rowand 2fe0e8769d of: overlay: check prevents multiple fragments touching same property
Add test case of two fragments updating the same property.  After
adding the test case, the system hangs at end of boot, after
after slub stack dumps from kfree() in crypto modprobe code.

Multiple overlay fragments adding, modifying, or deleting the same
property is not supported.  Add check to detect the attempt and fail
the overlay apply.

Before this patch, the first fragment error would terminate
processing.  Allow fragment checking to proceed and report all
of the fragment errors before terminating the overlay apply. This
is not a hot path, thus not a performance issue (the error is not
transient and requires fixing the overlay before attempting to
apply it again).

After applying this patch, the devicetree unittest messages will
include:

   OF: overlay: ERROR: multiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/rpm_avail

   ...

   ### dt-test ### end of unittest - 212 passed, 0 failed

The check to detect two fragments updating the same property is
folded into the patch that created the test case to maintain
bisectability.

Tested-by: Alan Tull <atull@kernel.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
2018-11-08 22:12:03 -08:00
..
unittest-data of: overlay: check prevents multiple fragments touching same property 2018-11-08 22:12:03 -08:00
address.c drivers/of: Make of_io_request_and_map() "name" argument optional 2018-07-10 08:08:57 -06:00
base.c Devicetree fixes for v4.20-rc1: 2018-11-01 14:45:38 -07:00
device.c Devicetree updates for 4.20: 2018-10-26 12:09:58 -07:00
dynamic.c of: overlay: add missing of_node_get() in __of_attach_node_sysfs 2018-11-08 22:10:53 -08:00
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
fdt.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
irq.c iommu/of: make of_pci_map_rid() available for other devices too 2018-09-25 09:47:52 +02:00
Kconfig of: change overlay apply input data from unflattened to FDT 2018-03-04 00:29:24 -08:00
kobj.c of: overlay: add missing of_node_get() in __of_attach_node_sysfs 2018-11-08 22:10:53 -08:00
Makefile PCI: Move OF-related PCI functions into PCI core 2018-01-17 17:36:39 -06:00
of_mdio.c of: Convert to using %pOFn instead of device_node.name 2018-09-07 11:04:41 -05:00
of_net.c of_net: Implement of_get_nvmem_mac_address helper 2018-03-30 10:40:18 -04:00
of_numa.c of: use for_each_of_cpu_node iterator 2018-09-28 14:25:58 -05:00
of_private.h of: make default address and size cells sizes private 2018-09-07 11:04:41 -05:00
of_reserved_mem.c memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
overlay.c of: overlay: check prevents multiple fragments touching same property 2018-11-08 22:12:03 -08:00
pdt.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
platform.c Devicetree updates for 4.20: 2018-10-26 12:09:58 -07:00
property.c device property: Constify device_get_match_data() 2018-02-12 10:41:11 +01:00
resolver.c of: overlay: validate offset from property fixups 2018-05-23 15:07:43 -05:00
unittest.c of: overlay: check prevents multiple fragments touching same property 2018-11-08 22:12:03 -08:00