Re: [PATCH v5 1/9] block: partitions: of: Skip child nodes without reg property

From: Bartosz Golaszewski

Date: Mon Jun 15 2026 - 04:47:19 EST


On Fri, 12 Jun 2026 15:20:53 +0200, Loic Poulain
<loic.poulain@xxxxxxxxxxxxxxxx> said:
> Child nodes of a fixed-partitions node are not necessarily partition
> entries, for example an nvmem-layout node has no reg property. The
> current code passes a NULL reg pointer and uninitialized len to the
> length check, which can result in a kernel panic or silent failure to
> register any partitions.
>
> Fix validate_of_partition() to return a skip indicator when no reg
> property is present. Guard add_of_partition() with a reg property
> check for the same reason.
>
> Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>
> ---

I think this warrants a Cc: stable and backporting as well as a Fixes tag.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>