Skip to content

of: overlay: avoid potential null pointer exception

Michael Riesch barebox 1 version Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2of: overlay: improve error handling in of_overlay_apply_treedrivers/of/overlay.c+9 -53 replies
2/2of: overlay: avoid potential null pointer exceptiondrivers/of/overlay.c+5 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] of: overlay: avoid potential null pointer exception

Hi all,

The function of_overlay_fix_path returns NULL in certain error cases but of_overlay_apply_symbols (which is the only caller) does not check the return value. For broken overlays this may result in a null pointer exception. Fix this by checking the return value and inform the user what exactly went wrong. To this end, improve the error handling in of_overlay_apply_tree.

The thread [0] gives a bit more context.

Best regards,
Michael

[0] https://lore.barebox.org/barebox/[email protected]/T/#u

Michael Riesch (2):
of: overlay: improve error handling in of_overlay_apply_tree
of: overlay: avoid potential null pointer exception

 drivers/of/overlay.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
Signature · 1 line
2.30.2