Re: [PATCH v5 1/9] block: partitions: of: Skip child nodes without reg property
Bartosz Golaszewski <[email protected]> Mon, 15 Jun 2026 01:47:06 -0700
| Newsgroups | org.infradead.lists.ath10k,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-block,org.kernel.vger.linux-bluetooth,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-mmc,org.kernel.vger.linux-wireless,org.kernel.vger.netdev |
|---|---|
| Message-ID | <CAMRc=MeNhR=30Q=gvPt0XwXbjJHgwjdC8gJ4nstwu2iKBD0x5w@mail.gmail.com> |
On Fri, 12 Jun 2026 15:20:53 +0200, Loic Poulain <[email protected]> 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 <[email protected]> > --- I think this warrants a Cc: stable and backporting as well as a Fixes tag. Reviewed-by: Bartosz Golaszewski <[email protected]>