2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-14 00:24:15 +08:00
linux-next/drivers/tty/serial
Tomas Melin b86f86e8e7 serial: 8250: fix potential deadlock in rs485-mode
Canceling hrtimer when holding uart spinlock can deadlock.

CPU0: syscall write
          -> get uart port spinlock
              -> write uart
                  -> start_tx_rs485
                      -> hrtimer_cancel
                          -> wait for hrtimer callback to finish

CPU1: hrtimer IRQ
          -> run hrtimer
              -> em485_handle_stop_tx
                  -> get uart port spinlock

CPU0 is waiting for the hrtimer callback to finish, but the hrtimer
callback running on CPU1 is waiting to get the uart port spinlock.

This deadlock can be avoided by not canceling the hrtimers in these paths.
Setting active_timer=NULL can be done without accessing hrtimer,
and that will effectively cancel operations that would otherwise have been
performed by the hrtimer callback.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04 12:38:04 +01:00
..
8250 serial: 8250: fix potential deadlock in rs485-mode 2017-11-04 12:38:04 +01:00
cpm_uart serial: cpm_uart: constify uart_ops structures 2017-08-28 20:51:21 +02:00
jsm tty: serial: jsm: Add space before the open brace 2017-10-03 20:31:39 +02:00
21285.c serial: 21285: constify uart_ops structures 2017-08-28 20:51:21 +02:00
altera_jtaguart.c serial: altera_jtaguart: adding iounmap() 2017-05-18 16:43:55 +02:00
altera_uart.c tty/serial: altera_uart: Convert timers to use timer_setup() 2017-11-04 12:01:54 +01:00
amba-pl010.c serial: pl010: constify amba_id 2017-08-28 20:51:19 +02:00
amba-pl011.c serial: pl011: Adopt generic flag to store auto RTS status 2017-11-04 12:08:54 +01:00
amba-pl011.h
apbuart.c serial: apbuart: constify uart_ops structures 2017-08-28 20:51:21 +02:00
apbuart.h
ar933x_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
arc_uart.c serial: arc: Remove __init marking from early write 2017-07-30 07:38:50 -07:00
atmel_serial.c tty/serial: atmel: Convert timers to use timer_setup() 2017-11-04 12:01:54 +01:00
atmel_serial.h tty/serial: atmel: move atmel_serial header into driver directory 2017-03-14 10:59:04 +08:00
bcm63xx_uart.c serial: bcm63xx: fix timing issue. 2017-09-18 18:19:20 +02:00
bfin_sport_uart.c tty: serial: make sport_uart_ops static and const 2017-09-18 18:31:48 +02:00
bfin_sport_uart.h
bfin_uart.c serial: bfin_uart: Convert timers to use timer_setup() 2017-11-04 12:01:53 +01:00
clps711x.c
crisv10.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
crisv10.h
digicolor-usart.c
dz.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
dz.h
earlycon-arm-semihost.c tty/serial: mark __init early_smh_setup() static 2016-09-02 15:03:35 +02:00
earlycon.c earlycon: initialise baud field of earlycon device structure 2017-08-31 18:47:31 +02:00
efm32-uart.c serial: efm32: Fix parity management in 'efm32_uart_console_get_options()' 2017-05-18 16:43:55 +02:00
etraxfs-uart.c
fsl_lpuart.c Merge 4.14-rc4 into tty-next 2017-10-09 09:05:05 +02:00
icom.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
icom.h
ifx6x60.c drivers: tty: ifx6x60: use setup_timer() helper. 2017-10-03 20:28:36 +02:00
ifx6x60.h
imx.c serial: imx: add hibernation support 2017-11-04 12:13:45 +01:00
ioc3_serial.c drivers: tty: serial: move inline before return type 2017-07-12 16:26:04 -07:00
ioc4_serial.c drivers: tty: serial: move inline before return type 2017-07-12 16:26:04 -07:00
ip22zilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
ip22zilog.h
Kconfig tty: serial: owl: Implement console driver 2017-07-18 09:28:29 +02:00
kgdb_nmi.c
kgdboc.c
lantiq.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
lpc32xx_hs.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
m32r_sio_reg.h
m32r_sio.c serial: m32r_sio: Drop redundant .data assignment 2017-11-04 12:38:04 +01:00
Makefile tty: serial: Add Actions Semi Owl UART earlycon 2017-06-20 10:24:15 +08:00
max310x.c serial: max310x: Add support for newer silicon revisions 2017-01-12 11:51:24 +01:00
max3100.c tty: max3100: remove unused variable rts and remove unused assignment 2017-11-04 12:08:53 +01:00
mcf.c
men_z135_uart.c tty: serial: constify uart_ops structures 2016-09-02 15:01:16 +02:00
meson_uart.c serial: meson: add Magic SysRq support 2017-09-18 18:31:48 +02:00
mpc52xx_uart.c serial: mpc52xx: constify uart_ops structures 2017-08-28 20:51:21 +02:00
mps2-uart.c
mpsc.c serial/mpsc: switch to dma_alloc_attrs 2017-06-20 10:24:15 +08:00
msm_serial.c tty: serial: msm: Move request_irq to the end of startup 2017-08-28 20:51:19 +02:00
mux.c drivers: tty: mux: use setup_timer() helper. 2017-10-03 20:28:35 +02:00
mvebu-uart.c serial: mvebu-uart: drop incorrect memset 2017-11-04 12:08:53 +01:00
mxs-auart.c serial: mxs-auart: Fix baudrate calculation 2017-03-31 17:26:19 +02:00
netx-serial.c
omap-serial.c serial: omap: Fix EFR write on RTS deassertion 2017-10-23 11:22:58 +02:00
owl-uart.c serial: owl: constify uart_ops structures 2017-08-28 20:51:19 +02:00
pch_uart.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
pic32_uart.c serial: pic32_uart: Fix 'request_irq' and 'free_irq' inconsistancy 2017-01-12 11:51:24 +01:00
pic32_uart.h
pmac_zilog.c tty: Convert to using %pOF instead of full_name 2017-07-30 07:35:28 -07:00
pmac_zilog.h
pnx8xxx_uart.c drivers: tty: pnx8xxx: use setup_timer() helper. 2017-10-03 20:28:36 +02:00
pxa.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
rp2.c
sa1100.c drivers: tty: sa1100: use setup_timer() helper. 2017-10-03 20:28:36 +02:00
samsung.c serial: samsung: Remove useless spinlock 2017-04-08 18:58:52 +02:00
samsung.h serial: samsung: Simplify DMA engine initialization code 2017-01-12 11:51:24 +01:00
sb1250-duart.c drivers: convert sbd_duart.map_guard from atomic_t to refcount_t 2017-03-14 11:01:40 +08:00
sc16is7xx.c sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h> 2017-03-02 08:42:27 +01:00
sccnxp.c serial: sccnxp: Convert timers to use timer_setup() 2017-11-04 12:01:54 +01:00
serial_core.c serial: core: remove redundant assignment to port 2017-11-04 12:08:53 +01:00
serial_ks8695.c
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_txx9.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
serial-tegra.c serial: tegra: explicitly request exclusive reset control 2017-07-30 07:35:28 -07:00
sh-sci.c serial: sh-sci: Fix unlocked access to SCSCR register 2017-11-04 12:08:53 +01:00
sh-sci.h serial: sh-sci: Support for variable HSCIF hardware RX timeout 2017-10-03 20:34:21 +02:00
sirfsoc_uart.c serial: sirf: make of_device_ids const 2017-06-20 10:24:15 +08:00
sirfsoc_uart.h
sn_console.c drivers: tty: sn_console: use setup_timer() helper. 2017-10-03 20:28:36 +02:00
sprd_serial.c tty: serial: sprd: fix error return code in sprd_probe() 2017-08-28 20:51:19 +02:00
st-asc.c serial: st-asc: Avoid using irq_wake flag 2017-08-28 20:51:19 +02:00
stm32-usart.c Arm: dts: stm32: remove extra compatible string from DT & driver 2017-10-04 10:15:47 +02:00
stm32-usart.h serial: stm32: add fifo support 2017-07-30 07:32:32 -07:00
suncore.c
sunhv.c sparc64: Send break twice from console to return to boot prom 2017-02-23 08:27:24 -08:00
sunsab.c serial: sunsab: constify uart_ops structures 2017-08-28 20:51:21 +02:00
sunsab.h
sunsu.c serial: sunsu: constify uart_ops structures 2017-08-28 20:51:21 +02:00
sunzilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sunzilog.h
tilegx.c
timbuart.c tty: serial: constify uart_ops structures 2016-09-02 15:01:16 +02:00
timbuart.h
uartlite.c serial-uartlite: pr_err() strings should end with newlines 2017-10-20 14:20:06 +02:00
ucc_uart.c serial: uuc_uart: constify uart_ops structures 2017-08-28 20:51:21 +02:00
vr41xx_siu.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
vt8500_serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
xilinx_uartps.c tty: xilinx_uartps: move to arch_initcall for earlier console 2017-10-04 10:15:47 +02:00
zs.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
zs.h