Skip to content

Commit

Permalink
USB: serial: fix write memory-allocation flag
Browse files Browse the repository at this point in the history
Fix regression introduced by commit 818f603 ("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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 25, 2013
1 parent 6f64854 commit 043e3f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 043e3f8

Please sign in to comment.