[PATCH v3 0/2] prevent incoherent can configuration in case of early return in the CAN netlink interface
From: Vincent Mailhol
Date: Mon Sep 06 2021 - 12:03:42 EST
This series of two patch prevents, once for all, can_priv to be in an
inconsistent state in case of an early return in can_changelink() due
to invalid parameters.
* Changelog *
v2 -> v3:
- Allocate the temporary struct can_priv on the heap instead of
declaring it as static.
- Split the patch into two to make it easier to backport to LTS
kernels and add the "Fixes" tag.
v1 -> v2:
- Change the prototype of can_calc_tdco() so that the changes are
applied to the temporary priv instead of netdev_priv(dev).
Vincent Mailhol (2):
can: netlink: prevent incoherent can configuration in case of early
return
can: bittiming: change can_calc_tdco()'s prototype to not directly
modify priv
drivers/net/can/dev/bittiming.c | 8 ++------
drivers/net/can/dev/netlink.c | 34 ++++++++++++++++++---------------
include/linux/can/bittiming.h | 7 +++++--
3 files changed, 26 insertions(+), 23 deletions(-)
--
2.32.0