]> asedeno.scripts.mit.edu Git - linux.git/commit
can: mcp251x: mcp251x_restart_work_handler(): Fix potential force_quit race condition
authorTimo Schlüßler <schluessler@krause.de>
Fri, 11 Oct 2019 13:38:19 +0000 (15:38 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 5 Nov 2019 11:44:22 +0000 (12:44 +0100)
commit27a0e54bae09d2dd023a01254db506d61cc50ba1
tree5a577bb3705d72191cb9f5be3f494913a2357dad
parent688d11c38423fd98ab6c8d5fc1976c8f365fc875
can: mcp251x: mcp251x_restart_work_handler(): Fix potential force_quit race condition

In mcp251x_restart_work_handler() the variable to stop the interrupt
handler (priv->force_quit) is reset after the chip is restarted and thus
a interrupt might occur.

This patch fixes the potential race condition by resetting force_quit
before enabling interrupts.

Signed-off-by: Timo Schlüßler <schluessler@krause.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251x.c