Re: [PATCH net] can: netlink: fix CAN XL PWM attribute sizing

From: Marc Kleine-Budde

Date: Wed Oct 21 2026 - 13:15:08 EST


On Fri, 04 Sep 2026 23:26:40 +0800, Zhu Ling <zhuling0805@xxxxxx> wrote:
> can_pwm_fill_info() emits the PWM capability limits whenever pwm_const is
> present, regardless of whether TMS is enabled. In contrast,
> can_pwm_get_size() currently returns zero when TMS is disabled. It
> therefore underestimates the required netlink message size by the nested
> attribute header and six u32 attributes.
>
> Always account for the PWM capability attributes when pwm_const is
> present, and account for the three runtime PWM values only when TMS is
> enabled.
>
> [...]

Reviewed-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>

--
Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>