Hi Quentin,

On 7/23/26 17:26, Quentin Schulz wrote:
Hi Stefan, Tom,

On 6/26/26 10:29 AM, Stefan Roese wrote:
On 6/25/26 11:45, Quentin Schulz wrote:
From: Quentin Schulz <[email protected]>

A bunch of code calls info->dev, mostly dev_* messages and devm_kzalloc.

The former can be passed a NULL device and _dev_printk handles this just
fine.
The latter ignores the dev argument whenever !CONFIG_IS_ENABLED(DEVRES)
which was true in most cases until we made CONFIG_DEVRES mandatory for
U-Boot proper in commit 217cf656e249 ("dm: core: Default to using DEVRES
outside of xPL"). Failing to set info->dev before it's used by
devm_kzalloc results in crashes, therefore let's set info->dev before it
can be used.

Reported-by: Ben Schneider <[email protected]>
Closes: https://eur02.safelinks.protection.outlook.com/? url=https%3A%2F%2Flore.kernel.org%2Fu-boot%2FIRefanijM8fTzOXeGe- H5hmhRkm7pt4Q83BV6VcWKlWp0s4i8mYcONTQz- IVhvNWlGta4LtnfK7ti6gxlrqq8h8cotgG1S0Fs6_DviAHvyo%3D%40bens.haus%2F&data=05%7C02%7Cquentin.schulz%40cherry.de%7Cdee6169699cf4dbea63208ded35d01ca%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C639180593585608379%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=miOSlgPfYtM%2BMUpk3G1eT1ZcJyVWDGuzeob2y3sI4mg%3D&reserved=0 Fixes: 0871806629b5 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
Fixes: 217cf656e249 ("dm: core: Default to using DEVRES outside of xPL")
Signed-off-by: Quentin Schulz <[email protected]>

Reviewed-by: Stefan Roese <[email protected]>


Going through my inbox... Just making sure this doesn't get forgotten.

I see MAINTAINERS has been updated to point at https://git.u-boot- project.org/u-boot/custodians/u-boot-marvell.git but there's no such custodian tree (yet?). I don't see this patch in a branch or tag in https://source.denx.de/u-boot/custodians/u-boot-marvell/ either.

Ah, I need to act here with the new list etc. Sorry, was lazy. Will do
tomorrow.

Thanks,
Stefan

Reply via email to