mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
a9515ff4fb
When of_overlay_fdt_apply() fails, the changeset may be partially
applied, and the caller is still expected to call of_overlay_remove() to
clean up this partial state.
However, of_overlay_apply() calls of_resolve_phandles() before
init_overlay_changeset(). Hence if the overlay fails to apply due to an
unresolved symbol, the overlay_changeset.cset.entries list is still
uninitialized, and cleanup will crash with a NULL-pointer dereference in
overlay_removal_is_ok().
Fix this by moving the call to of_changeset_init() from
init_overlay_changeset() to of_overlay_fdt_apply(), where all other
early initialization is done.
Fixes:
|
||
---|---|---|
.. | ||
unittest-data | ||
address.c | ||
base.c | ||
cpu.c | ||
device.c | ||
dynamic.c | ||
fdt_address.c | ||
fdt.c | ||
irq.c | ||
Kconfig | ||
kexec.c | ||
kobj.c | ||
Makefile | ||
module.c | ||
of_numa.c | ||
of_private.h | ||
of_reserved_mem.c | ||
overlay.c | ||
pdt.c | ||
platform.c | ||
property.c | ||
resolver.c | ||
unittest.c |