1
0
Fork 0
alistair23-linux/drivers/tty/serial
Anders Roxell 646097940a serial: set suppress_bind_attrs flag only if builtin
When the test 'CONFIG_DEBUG_TEST_DRIVER_REMOVE=y' is enabled,
arch_initcall(pl011_init) came before subsys_initcall(default_bdi_init).
devtmpfs gets killed because we try to remove a file and decrement the
wb reference count before the noop_backing_device_info gets initialized.

[    0.332075] Serial: AMBA PL011 UART driver
[    0.485276] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 39, base_baud = 0) is a PL011 rev1
[    0.502382] console [ttyAMA0] enabled
[    0.515710] Unable to handle kernel paging request at virtual address 0000800074c12000
[    0.516053] Mem abort info:
[    0.516222]   ESR = 0x96000004
[    0.516417]   Exception class = DABT (current EL), IL = 32 bits
[    0.516641]   SET = 0, FnV = 0
[    0.516826]   EA = 0, S1PTW = 0
[    0.516984] Data abort info:
[    0.517149]   ISV = 0, ISS = 0x00000004
[    0.517339]   CM = 0, WnR = 0
[    0.517553] [0000800074c12000] user address but active_mm is swapper
[    0.517928] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[    0.518305] Modules linked in:
[    0.518839] CPU: 0 PID: 13 Comm: kdevtmpfs Not tainted 4.19.0-rc5-next-20180928-00002-g2ba39ab0cd01-dirty #82
[    0.519307] Hardware name: linux,dummy-virt (DT)
[    0.519681] pstate: 80000005 (Nzcv daif -PAN -UAO)
[    0.519959] pc : __destroy_inode+0x94/0x2a8
[    0.520212] lr : __destroy_inode+0x78/0x2a8
[    0.520401] sp : ffff0000098c3b20
[    0.520590] x29: ffff0000098c3b20 x28: 00000000087a3714
[    0.520904] x27: 0000000000002000 x26: 0000000000002000
[    0.521179] x25: ffff000009583000 x24: 0000000000000000
[    0.521467] x23: ffff80007bb52000 x22: ffff80007bbaa7c0
[    0.521737] x21: ffff0000093f9338 x20: 0000000000000000
[    0.522033] x19: ffff80007bbb05d8 x18: 0000000000000400
[    0.522376] x17: 0000000000000000 x16: 0000000000000000
[    0.522727] x15: 0000000000000400 x14: 0000000000000400
[    0.523068] x13: 0000000000000001 x12: 0000000000000001
[    0.523421] x11: 0000000000000000 x10: 0000000000000970
[    0.523749] x9 : ffff0000098c3a60 x8 : ffff80007bbab190
[    0.524017] x7 : ffff80007bbaa880 x6 : 0000000000000c88
[    0.524305] x5 : ffff0000093d96c8 x4 : 61c8864680b583eb
[    0.524567] x3 : ffff0000093d6180 x2 : ffffffffffffffff
[    0.524872] x1 : 0000800074c12000 x0 : 0000800074c12000
[    0.525207] Process kdevtmpfs (pid: 13, stack limit = 0x(____ptrval____))
[    0.525529] Call trace:
[    0.525806]  __destroy_inode+0x94/0x2a8
[    0.526108]  destroy_inode+0x34/0x88
[    0.526370]  evict+0x144/0x1c8
[    0.526636]  iput+0x184/0x230
[    0.526871]  dentry_unlink_inode+0x118/0x130
[    0.527152]  d_delete+0xd8/0xe0
[    0.527420]  vfs_unlink+0x240/0x270
[    0.527665]  handle_remove+0x1d8/0x330
[    0.527875]  devtmpfsd+0x138/0x1c8
[    0.528085]  kthread+0x14c/0x158
[    0.528291]  ret_from_fork+0x10/0x18
[    0.528720] Code: 92800002 aa1403e0 d538d081 8b010000 (c85f7c04)
[    0.529367] ---[ end trace 5a3dee47727f877c ]---

Rework to set suppress_bind_attrs flag to avoid removing the device when
CONFIG_DEBUG_TEST_DRIVER_REMOVE=y. This applies for pic32_uart and
xilinx_uartps as well.

Co-developed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09 09:07:17 -08:00
..
8250 Merge 4.19-rc7 into tty-next 2018-10-08 15:43:12 +02:00
cpm_uart mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
jsm tty: serial: jsm: remove redundant pointer ch 2018-07-13 15:36:32 +02:00
21285.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
Kconfig tty/serial: atmel: Change the driver to work under at91-usart MFD 2018-09-10 16:12:43 +01:00
Makefile TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07: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 serial: set suppress_bind_attrs flag only if builtin 2018-11-09 09:07:17 -08: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: add ISO7816 support 2018-10-02 13:38:55 -07:00
atmel_serial.h tty/serial: atmel: add ISO7816 support 2018-10-02 13:38:55 -07: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: clear parity enable bit when disable parity 2018-11-09 08:48:57 -08: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 Merge 4.19-rc6 into tty-next 2018-09-30 08:11:09 -07: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
kgdb_nmi.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
kgdboc.c kgdboc: Fix warning with module build 2018-09-20 09:17:25 +02:00
lantiq.c serial: lantiq: Change init_lqasc to static declaration 2018-11-09 08:43:27 -08:00
lpc32xx_hs.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
max310x.c serial: max310x: Check the clock readiness 2018-06-28 21:07:54 +09: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 serial: mvebu-uart: Fix reporting of effective CSIZE to userspace 2018-09-18 15:22:15 +02:00
mxs-auart.c serial: mxs-auart: Fix potential infinite loop 2018-09-18 16:07:24 +02: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 pch_uart: remove set but not used variable 'tx_empty' 2018-11-09 09:07:17 -08:00
pic32_uart.c serial: set suppress_bind_attrs flag only if builtin 2018-11-09 09:07:17 -08:00
pic32_uart.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
pmac_zilog.c tty: serial: remove set but not used variable 'error' 2018-09-20 13:33:15 +02: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 an error handling path in 'serial_pxa_probe()' 2018-06-28 21:07:54 +09:00
qcom_geni_serial.c tty: serial: qcom_geni_serial: simplify getting .driver_data 2018-11-09 08:58:19 -08:00
rp2.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
sa1100.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
samsung.c serial: samsung: Enable baud clock for UART reset procedure in resume 2018-09-18 16:07:24 +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: Fix for "Unexpected interrupt: 8" 2018-09-18 16:07:25 +02:00
sccnxp.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
serial-tegra.c serial: tegra: fix some spelling mistakes 2018-11-09 08:58:18 -08:00
serial_core.c TTY/Serial patches for 4.20-rc1 2018-10-29 10:42:20 -07:00
serial_ks8695.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
serial_mctrl_gpio.c gpiolib: Pass array info to get/set array functions 2018-09-13 11:16:54 +02: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
sh-sci.c serial: sh-sci: Improve type-safety calling sci_receive_chars() 2018-11-09 04:37:00 -08: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 TTY: sn_console: Replace spin_is_locked() with spin_trylock() 2018-10-04 11:06:35 -07:00
sprd_serial.c serial: sprd: Fix the indentation issue 2018-09-18 16:07:24 +02: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 treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07: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 serial-uartlite: Fix the unbind path 2018-11-09 08:45:07 -08: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 serial: set suppress_bind_attrs flag only if builtin 2018-11-09 09:07:17 -08: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