Re: [PATCH] can: netlink: avoid call to do_set_data_bittiming callback with stale can_priv::ctrlmode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08.08.2024 18:42:24, Stefan Mätje wrote:
> This patch moves the evaluation of data[IFLA_CAN_CTRLMODE] in function
> can_changelink in front of the evaluation of data[IFLA_CAN_BITTIMING].
> 
> This avoids a call to do_set_data_bittiming providing a stale
> can_priv::ctrlmode with a CAN_CTRLMODE_FD flag not matching the
> requested state when switching between a CAN Classic and CAN-FD bitrate.
> 
> In the same manner the evaluation of data[IFLA_CAN_CTRLMODE] in function
> can_validate is also moved in front of the evaluation of
> data[IFLA_CAN_BITTIMING].
> 
> This is a preparation for patches where the nominal and data bittiming
> may have interdependencies on the driver side depending on the
> CAN_CTRLMODE_FD flag state.
> 
> Signed-off-by: Stefan Mätje <stefan.maetje@xxxxxx>

Added to linux-can-next.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux