[question] Is it possible to remove an active port (without shutdown)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Consider the following events involving drivers/tty/serial/owl-uart.c:

Suppose the driver is registered, and the owl_uart_probe() was called.
Then uart_startup() can be called in serial core. This calls
owl_uart_startup() which registers the interrupt handler owl_uart_irq.

Now suppose uart_remove_one_port() in serial core is called. This
detaches port from the core. This calls owl_uart_release_port(port).
This writes NULL to port->membase after iounmap of port->membase from
port->dev.

During this point, an interrupt is triggered and the interrupt callback
owl_uart_irq() is called (parallel with uart_remove_one_port()). This
tries to read port->membase to send or receive chars (with spinlock on
port->lock). This introduces a race condition on port->membase.

QUESTION: Is it possible to remove an active port (without shutdown)?



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux