]> git.karo-electronics.de Git - karo-tx-linux.git/commit
serial: 8250: Fix thread unsafe __dma_tx_complete function
authorLoic Poulain <loic.poulain@intel.com>
Thu, 24 Apr 2014 09:34:48 +0000 (11:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:08 +0000 (10:28 -0700)
commit7d056f1066bd1d677273e3db285e00f0fd80674d
treefab33dd9a9f971f10dc06bf6f633ed0c147271f6
parente83c667a1f451b1ae47a27d5e2ef0acb5f2c5b3d
serial: 8250: Fix thread unsafe __dma_tx_complete function

commit f8fd1b0350d3a4581125f5eda6528f5a2c5f9183 upstream.

__dma_tx_complete is not protected against concurrent
call of serial8250_tx_dma. it can lead to circular tail
index corruption or parallel call of serial_tx_dma on the
same data portion.

This patch fixes this issue by holding the port lock.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dma.c