The patch titled Serial-Core: adds atomic context debug code. has been added to the -mm tree. Its filename is serial-core-adds-atomic-context-debug-code.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Serial-Core: adds atomic context debug code. From: "Luiz Fernando N. Capitulino" <lcapitulino@xxxxxxxxxxxxxxx> While porting the USB-Serial layer to the Serial Core API [1], we found that usb-serial devices must be able to sleep in the get_mctrl() and set_mctrl() callbacks [2]. But, unfortunately, those callbacks are called with a spinlock held. The solution is to switch from the spinlock to a mutex. But turns out that we have no sure whether uart_update_mctrl(), uart_startup() and uart_configure_port() (which calls {get,set}_mctrl()) are called from atomic context or not. This patch adds might_sleep() calls to them in order to help us to find the answer. This is just a debug patch to stay in -mm for a while, ie, it's not a submission for mainline kernel. [1] http://marc.theaimsgroup.com/?l=linux-usb-devel&m=114921742628790&w=2 [2] http://lkml.org/lkml/2006/6/13/242 Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@xxxxxxxxxxxxxxx> Cc: Russell King <rmk@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/serial/serial_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN drivers/serial/serial_core.c~serial-core-adds-atomic-context-debug-code drivers/serial/serial_core.c --- a/drivers/serial/serial_core.c~serial-core-adds-atomic-context-debug-code +++ a/drivers/serial/serial_core.c @@ -128,6 +128,8 @@ uart_update_mctrl(struct uart_port *port unsigned long flags; unsigned int old; + might_sleep(); + spin_lock_irqsave(&port->lock, flags); old = port->mctrl; port->mctrl = (old & ~clear) | set; @@ -150,6 +152,8 @@ static int uart_startup(struct uart_stat unsigned long page; int retval = 0; + might_sleep(); + if (info->flags & UIF_INITIALIZED) return 0; @@ -2056,6 +2060,8 @@ uart_configure_port(struct uart_driver * { unsigned int flags; + might_sleep(); + /* * If there isn't a port here, don't do anything further. */ _ Patches currently in -mm which might be from lcapitulino@xxxxxxxxxxxxxxx are origin.patch serial-core-adds-atomic-context-debug-code.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html