]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fdt: Update CRC check for rng-seed
authorHsin-Yi Wang <hsinyi@chromium.org>
Tue, 27 Aug 2019 10:33:53 +0000 (18:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Jul 2022 14:18:10 +0000 (16:18 +0200)
commit2d83b6548a43b27c6c5bcb1377adff87c614423c
treec47a6ebcf3b8819a8fa8721415c69c28c8e79a6e
parentf319c9b45b351019349cc779ce6721ebc211245c
fdt: Update CRC check for rng-seed

commit dd753d961c4844a39f947be115b3d81e10376ee5 upstream.

Commit 428826f5358c ("fdt: add support for rng-seed") moves of_fdt_crc32
from early_init_dt_verify() to early_init_dt_scan() since
early_init_dt_scan_chosen() may modify fdt to erase rng-seed.

However, arm and some other arch won't call early_init_dt_scan(), they
call early_init_dt_verify() then early_init_dt_scan_nodes().

Restore of_fdt_crc32 to early_init_dt_verify() then update it in
early_init_dt_scan_chosen() if fdt if updated.

Fixes: 428826f5358c ("fdt: add support for rng-seed")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/fdt.c