From: Johan Hovold Date: Sat, 9 Nov 2013 11:38:10 +0000 (+0100) Subject: USB: serial: fix write memory-allocation flag X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=043e3f834530e15e89c58c1b7af59cc646700134;p=linux-beck.git USB: serial: fix write memory-allocation flag Fix regression introduced by commit 818f60365a29 ("USB: serial: add memory flags to usb_serial_generic_write_start"), which incorrectly used GFP_KERNEL in write(), which must not not sleep. Reported-by: Dave Jones Tested-by: Dave Jones Cc: Dave Jones Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index e36b25a2fa02..b63ce023f96f 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -200,7 +200,7 @@ int usb_serial_generic_write(struct tty_struct *tty, return 0; count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); - result = usb_serial_generic_write_start(port, GFP_KERNEL); + result = usb_serial_generic_write_start(port, GFP_ATOMIC); if (result) return result;