[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176765111114.3559000.3639451594836452599.robh@kernel.org>
Date: Mon, 5 Jan 2026 16:11:53 -0600
From: "Rob Herring (Arm)" <robh@...nel.org>
To: Tuo Li <islituo@...il.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
saravanak@...gle.com
Subject: Re: [PATCH] of: unittest: fix possible null-pointer dereferences in
of_unittest_property_copy()
On Mon, 05 Jan 2026 15:14:38 +0800, Tuo Li wrote:
> This function first duplicates p1 and p2 into new, and then checks whether
> the duplication succeeds. However, if the duplication fails (e.g.,
> kzalloc() returns NULL in __of_prop_dup()), new will be NULL but is still
> dereferenced in __of_prop_free(). To ensure that the unit test continues to
> run even when duplication fails, add a NULL check before calling
> __of_prop_free().
>
> Fixes: 1c5e3d9bf33b ("of: Add a helper to free property struct")
> Signed-off-by: Tuo Li <islituo@...il.com>
> ---
> drivers/of/unittest.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Applied, thanks!
Powered by blists - more mailing lists