linux_dsm_epyc7002/drivers/tty/serial
Sebastian Andrzej Siewior 9594b5be7e tty/serial: atmel: use port->name as name in request_irq()
I was puzzled while looking at /proc/interrupts and random things showed
up between reboots. This occurred more often but I realised it later. The
"correct" output should be:
|38:      11861  atmel-aic5   2 Level     ttyS0

but I saw sometimes
|38:       6426  atmel-aic5   2 Level     tty1

and accounted it wrongly as correct. This is use after free and the
former example randomly got the "old" pointer which pointed to the same
content. With SLAB_FREELIST_RANDOM and HARDENED I even got
|38:       7067  atmel-aic5   2 Level     E=Started User Manager for UID 0

or other nonsense.
As it turns out the tty, pointer that is accessed in atmel_startup(), is
freed() before atmel_shutdown(). It seems to happen quite often that the
tty for ttyS0 is allocated and freed while ->shutdown is not invoked. I
don't do anything special - just a systemd boot :)

Use dev_name(&pdev->dev) as the IRQ name for request_irq(). This exists
as long as the driver is loaded so no use-after-free here.

Cc: stable@vger.kernel.org
Fixes: 761ed4a945 ("tty: serial_core: convert uart_close to use tty_port_close")
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 13:48:28 +02:00
..
8250 serial: 8250_early: Setup divider when uartclk is passed 2018-04-25 14:56:12 +02:00
cpm_uart TTY/Serial patches for 4.15-rc1 2017-11-13 21:05:31 -08:00
jsm tty: serial: jsm: Add one check against NULL pointer dereference 2018-01-09 16:37:03 +01:00
21285.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
altera_jtaguart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
altera_uart.c serial: altera: set RRDY flag also without irq 2018-02-28 13:30:09 +01:00
amba-pl010.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
amba-pl011.c tty: pl011: Avoid spuriously stuck-off interrupts 2018-05-14 13:41:05 +02:00
amba-pl011.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
apbuart.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
apbuart.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ar933x_uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
arc_uart.c serial: arc_uart: Fix out-of-bounds access through DT alias 2018-02-28 15:29:59 +01:00
atmel_serial.c tty/serial: atmel: use port->name as name in request_irq() 2018-05-14 13:48:28 +02:00
atmel_serial.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
bcm63xx_uart.c MIPS changes for 4.15 2017-11-15 11:36:08 -08:00
clps711x.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
digicolor-usart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
dz.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
dz.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
earlycon-arm-semihost.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
earlycon.c earlycon: Remove hardcoded port->uartclk initialization in of_setup_earlycon 2018-05-14 13:41:05 +02:00
efm32-uart.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
fsl_lpuart.c serial: fsl_lpuart: Fix out-of-bounds access through DT alias 2018-02-28 15:29:59 +01:00
icom.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
icom.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
ifx6x60.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
ifx6x60.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
imx.c serial: imx: dma_unmap_sg buffers on shutdown 2018-05-14 13:48:28 +02:00
ioc3_serial.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
ioc4_serial.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
ip22zilog.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
ip22zilog.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig serial: Remove depends on HAS_DMA in case of platform dependency 2018-04-23 10:14:57 +02:00
kgdb_nmi.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
kgdboc.c Modules updates for v4.15 2017-11-15 13:46:33 -08:00
lantiq.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
lpc32xx_hs.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
Makefile TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00
max310x.c gpio: serial: max310x: Use HW type for gpio_chip's label 2018-02-28 13:40:22 +01:00
max3100.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mcf.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
men_z135_uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
meson_uart.c tty: serial: meson: fix typo in the "stop bit" register definition 2017-11-28 15:32:33 +01:00
mpc52xx_uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
mps2-uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
mpsc.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
msm_serial.c tty: serial: msm_serial: Add __maybe_unused to suspend/resume callbacks 2018-05-14 13:41:05 +02:00
mux.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
mvebu-uart.c Merge 4.17-rc3 into tty-next 2018-04-30 05:14:55 -07:00
mxs-auart.c serial: mxs-auart: disable clks of Alphascale ASM9260 2018-03-09 11:01:19 -08:00
netx-serial.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
omap-serial.c tty: omap-serial: Fix initial on-boot RTS GPIO level 2018-01-09 16:45:17 +01:00
owl-uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
pch_uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
pic32_uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
pic32_uart.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
pmac_zilog.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
pmac_zilog.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pnx8xxx_uart.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
pxa.c serial: pxa: Fix out-of-bounds access through serial port index 2018-02-28 15:29:59 +01:00
qcom_geni_serial.c tty: serial: qcom_geni_serial: Add early console support 2018-05-14 13:44:55 +02:00
rp2.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
sa1100.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
samsung.c serial: samsung: fix maxburst parameter for DMA transactions 2018-05-14 13:41:05 +02:00
samsung.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
sb1250-duart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
sc16is7xx.c sc16is7xx: Check for an error when the clock is enabled. 2018-04-25 14:56:12 +02:00
sccnxp.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
serial_core.c serial: Introduce UPSTAT_SYNC_FIFO for synchronised FIFOs 2018-04-23 10:16:50 +02:00
serial_ks8695.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
serial_mctrl_gpio.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
serial_mctrl_gpio.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
serial_txx9.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
serial-tegra.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
sh-sci.c serial: sh-sci: Support for HSCIF RX sampling point adjustment 2018-04-23 10:08:18 +02:00
sh-sci.h serial: sh-sci: Support for HSCIF RX sampling point adjustment 2018-04-23 10:08:18 +02:00
sirfsoc_uart.c serial: sirf: Fix out-of-bounds access through DT alias 2018-02-28 15:30:00 +01:00
sirfsoc_uart.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
sn_console.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
sprd_serial.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
st-asc.c tty: serial: simplify getting .drvdata 2018-04-22 17:29:43 +02:00
stm32-usart.c serial: stm32: fix initialization of RS485 mode 2018-03-15 17:39:43 +01:00
stm32-usart.h serial: stm32: add support for RS485 hardware control mode 2018-03-14 13:35:37 +01:00
suncore.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
sunhv.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
sunsab.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
sunsab.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunsu.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
sunzilog.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
sunzilog.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
timbuart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
timbuart.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
uartlite.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
ucc_uart.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
vr41xx_siu.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
vt8500_serial.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
xilinx_uartps.c Merge 4.17-rc3 into tty-next 2018-04-30 05:14:55 -07:00
zs.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
zs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00