Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460829
| From | Alexey Khoroshilov <khoroshilov@ispras.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] USB: mos7840: fix non-atomic allocation in write path |
| Date | 2016-08-12 00:20 +0200 |
| Message-ID | <s56uu-1pD-33@gated-at.bofh.it> (permalink) |
| References | <s56ut-1pD-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
There is an allocation with GFP_KERNEL flag in mos7840_write(),
while it may be called from interrupt context.
Follow-up for commit 191252837626 ("USB: kobil_sct: fix non-atomic allocation in write path")
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
drivers/usb/serial/mos7840.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index ed378fb232e7..1de2c01c078d 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -1341,7 +1341,7 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
if (urb->transfer_buffer == NULL) {
urb->transfer_buffer =
- kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
+ kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
if (!urb->transfer_buffer)
goto exit;
}
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] USB: mos7720: fix non-atomic allocation in write path Alexey Khoroshilov <khoroshilov@ispras.ru> - 2016-08-12 00:20 +0200
[PATCH 2/2] USB: mos7840: fix non-atomic allocation in write path Alexey Khoroshilov <khoroshilov@ispras.ru> - 2016-08-12 00:20 +0200
Re: [PATCH 2/2] USB: mos7840: fix non-atomic allocation in write path Johan Hovold <johan@kernel.org> - 2016-08-15 10:50 +0200
csiph-web