]> git.baikalelectronics.ru Git - kernel.git/commit
can: c_can: Provide protection in the xmit path
authorThomas Gleixner <tglx@linutronix.de>
Tue, 18 Mar 2014 17:19:12 +0000 (17:19 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 1 Apr 2014 09:55:00 +0000 (11:55 +0200)
commitf9e3b01c1a1c5d6364858699df946da07d65601c
treef1ee16ea5621c98799fdf17f5b102474a77b4e8e
parent519560c7b60568a0af98c0f4a42422f7c64ee28b
can: c_can: Provide protection in the xmit path

The network core does not serialize the access to the hardware. The
xmit related code lets the following happen:

CPU0               CPU1
interrupt()
 do_poll()
   c_can_do_tx()
    Fiddle with HW and xmit()
    internal data   Fiddle with HW and
             internal data

due the complete lack of serialization.

Add proper locking.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c
drivers/net/can/c_can/c_can.h