Re: [PATCH v4 4/6] of/overlay: return ERR_PTR from dup_and_fixup_symbol_prop()
From: Krzysztof Kozlowski
Date: Wed Jul 22 2026 - 03:37:08 EST
On Tue, Jul 21, 2026 at 06:01:49PM -0700, Abdurrahman Hussain wrote:
> dup_and_fixup_symbol_prop() returns NULL for three very different
> reasons: the property value is not a valid non-empty C string
> (malformed input), the value does not resolve to a node inside one of
> the overlay's fragments (not an overlay-internal path), and memory
> allocation failure. Its only caller today reports every NULL as
> -ENOMEM, so structural problems in an overlay's /__symbols__ node are
> diagnosed as memory exhaustion.
>
> The next patch reuses the helper for /aliases values, where the
> distinction is load-bearing: a value that doesn't resolve inside the
> overlay is a legacy alias that must be copied verbatim, a malformed
> value must be admitted inertly with a warning, and only a real
> allocation failure may fail the overlay apply.
Again, AI written.
>
> Return ERR_PTR instead: -EINVAL for malformed values, -ENODEV when
Why?
Best regards,
Krzysztof