1 From 5a5a1d614287a647b36dff3f40c2b0ceabbc83ec Mon Sep 17 00:00:00 2001
2 From: Alexey Khoroshilov <khoroshilov@ispras.ru>
3 Date: Fri, 12 Aug 2016 01:05:08 +0300
4 Subject: USB: serial: mos7720: fix non-atomic allocation in write path
6 From: Alexey Khoroshilov <khoroshilov@ispras.ru>
8 commit 5a5a1d614287a647b36dff3f40c2b0ceabbc83ec upstream.
10 There is an allocation with GFP_KERNEL flag in mos7720_write(),
11 while it may be called from interrupt context.
13 Follow-up for commit 191252837626 ("USB: kobil_sct: fix non-atomic
14 allocation in write path")
16 Found by Linux Driver Verification project (linuxtesting.org).
18 Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
19 Signed-off-by: Johan Hovold <johan@kernel.org>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 drivers/usb/serial/mos7720.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
26 --- a/drivers/usb/serial/mos7720.c
27 +++ b/drivers/usb/serial/mos7720.c
28 @@ -1252,7 +1252,7 @@ static int mos7720_write(struct tty_stru
30 if (urb->transfer_buffer == NULL) {
31 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
34 if (!urb->transfer_buffer)