Thread (15 messages) 15 messages, 2 authors, 21d ago

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

From: Bartosz Golaszewski <brgl@kernel.org>
Date: 2026-06-15 08:47:09
Also in: linux-arm-msm, linux-block, linux-bluetooth, linux-devicetree, linux-mmc, linux-wireless, lkml

On Fri, 12 Jun 2026 15:20:53 +0200, Loic Poulain
[off-list ref] 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@oss.qualcomm.com>
---
I think this warrants a Cc: stable and backporting as well as a Fixes tag.

Reviewed-by: Bartosz Golaszewski <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help