In dt_copy_subtree(), the device_tree_node copying
*dst_node = *src_node;
doesn't work correctly for circular linked lists [1], because the 'next'
pointer of the last element isn't modified to point to the dst head.
As the only public caller of dt_copy_subtree() is dt_apply_overlay(),
and the dt_apply_overlay() function comment already explicitly disallows
'overlay' accesses after the call, fix the problem by utilizing
list_move() for copying device tree node properties and children.
Also add a new test case test_dt_apply_overlay.
[1] commit
|
||
|---|---|---|
| .. | ||
| acpi | ||
| commonlib | ||
| console | ||
| data/lib | ||
| device | ||
| drivers | ||
| helpers | ||
| include | ||
| lib | ||
| mock | ||
| stubs | ||
| Makefile.common | ||
| Makefile.mk | ||