diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-11-09 06:38:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-25 11:39:40 -0500 |
commit | 043e3f834530e15e89c58c1b7af59cc646700134 (patch) | |
tree | 14b3c7551844df5cdb030e4100a11ab96632ffcc | |
parent | 6f6485463aada1ec6a0f3db6a03eb8e393d6bb55 (diff) |
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 <davej@fedoraproject.org>
Tested-by: Dave Jones <davej@fedoraproject.org>
Cc: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
200 | return 0; | 200 | return 0; |
201 | 201 | ||
202 | count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); | 202 | count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); |
203 | result = usb_serial_generic_write_start(port, GFP_KERNEL); | 203 | result = usb_serial_generic_write_start(port, GFP_ATOMIC); |
204 | if (result) | 204 | if (result) |
205 | return result; | 205 | return result; |
206 | 206 | ||