Re: [PATCH net v2 01/14] net: pse-pd: size the notification kfifo after defaulting nr_lines

From: Oleksij Rempel

Date: Wed Oct 21 2026 - 01:22:01 EST


On Tue, Oct 20, 2026 at 07:12:36PM +0200, Carlo Szelinsky wrote:
> pse_controller_register() allocates the notification kfifo before it
> turns nr_lines == 0 into 1, and kfifo_alloc() fails for a size below 2.
> So a controller with nr_lines 0 or 1 cannot register. pse_regulator
> (podl-pse-regulator) never sets nr_lines, so its probe has failed with
> -EINVAL ever since the kfifo was added.
>
> Apply the default first, and allocate at least two entries.
>
> Triggered in QEMU (arm64) with a test-only PSE controller with
> nr_lines 0: its probe failed with "failed to allocate kfifo
> notifications". With this patch it registers.
>
> Fixes: ffef61d6d273 ("net: pse-pd: Add support for budget evaluation strategies")
> Reviewed-by: Kory Maincent <kory.maincent@xxxxxxxxxxx>
> Signed-off-by: Carlo Szelinsky <github@xxxxxxxxxxxx>

Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

Thank you!
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |