]> git.dujemihanovic.xyz Git - u-boot.git/commit
log: fixup log_head after relocating global data
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 13 Feb 2024 17:13:28 +0000 (18:13 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 2 Mar 2024 17:26:56 +0000 (12:26 -0500)
commit39162d9348584ad6d86cb2a3a540ca38f8be7ff8
treec59108f24be5abbe0cb1e5202a41793f38c1e174
parent657bd30c6b3ee8c80a94ebfe7c8b5c4b027ae038
log: fixup log_head after relocating global data

When `gd` is relocated during `spl_relocate_stack_gd()` the
doubly-linked circular list in the `log_head` member is broken.

The last element of the list should point back to the initial
`list_head`, but as the initial `list_head` is moved the pointer becomes
stale. As a result the loop in `log_dispatch` would never finish.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
common/log.c
common/spl/spl.c
include/log.h