linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] prevent incoherent can configuration in case of early return in the CAN netlink interface
@ 2021-09-06 16:03 Vincent Mailhol
  2021-09-06 16:03 ` [PATCH v3 1/2] can: netlink: prevent incoherent can configuration in case of early return Vincent Mailhol
  2021-09-06 16:03 ` [PATCH v3 2/2] can: bittiming: change can_calc_tdco()'s prototype to not directly modify priv Vincent Mailhol
  0 siblings, 2 replies; 9+ messages in thread
From: Vincent Mailhol @ 2021-09-06 16:03 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can; +Cc: netdev, linux-kernel, Vincent Mailhol

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-14 12:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 16:03 [PATCH v3 0/2] prevent incoherent can configuration in case of early return in the CAN netlink interface Vincent Mailhol
2021-09-06 16:03 ` [PATCH v3 1/2] can: netlink: prevent incoherent can configuration in case of early return Vincent Mailhol
2021-09-07  2:05   ` Vincent MAILHOL
2021-09-07 12:51   ` Vincent MAILHOL
2021-09-08 11:41     ` Oliver Hartkopp
2021-09-14  9:35       ` Vincent MAILHOL
2021-09-14 11:45         ` Vincent MAILHOL
2021-09-14 12:13           ` Oliver Hartkopp
2021-09-06 16:03 ` [PATCH v3 2/2] can: bittiming: change can_calc_tdco()'s prototype to not directly modify priv Vincent Mailhol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).