diff options
author | Johan Hovold <johan@kernel.org> | 2014-10-29 09:07:30 +0100 |
---|---|---|
committer | Stefan Bader <stefan.bader@canonical.com> | 2014-11-25 15:20:27 +0100 |
commit | 6af4278b89c6f7fd9d980e1595ee88c83232ea5e (patch) | |
tree | 76c792df5cb878bb5f60f2db358802a651dba569 | |
parent | b44c8eab798440522b55613449afc4038195de69 (diff) | |
download | linux-2.6.32.y-drm33.z-6af4278b89c6f7fd9d980e1595ee88c83232ea5e.tar.gz |
USB: kobil_sct: fix non-atomic allocation in write path
Write may be called from interrupt context so make sure to use
GFP_ATOMIC for all allocations in write.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
(cherry picked from commit 191252837626fca0de694c18bb2aa64c118eda89)
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 929ceb11179cce..935f6e31787ccf 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -464,7 +464,7 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port, ); priv->cur_pos = priv->cur_pos + length; - result = usb_submit_urb(port->write_urb, GFP_NOIO); + result = usb_submit_urb(port->write_urb, GFP_ATOMIC); dbg("%s - port %d Send write URB returns: %i", __func__, port->number, result); todo = priv->filled - priv->cur_pos; @@ -488,7 +488,7 @@ static int kobil_write(struct tty_struct *tty, struct usb_serial_port *port, port->interrupt_in_urb->dev = port->serial->dev; result = usb_submit_urb(port->interrupt_in_urb, - GFP_NOIO); + GFP_ATOMIC); dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result); } |