USB: kobil_sct: fix non-atomic allocation in write path
authorJohan Hovold <johan@kernel.org>
Wed, 29 Oct 2014 08:07:30 +0000 (09:07 +0100)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:05:11 +0000 (17:05 +0800)
commitac9428b118d6990dbfa9df97d49a7ccdb56c7736
tree20c0ff74072a4dd82a0af26b4758bcde01f3312c
parentb1873077c564ef1103f593d85f0792b16ea89367
USB: kobil_sct: fix non-atomic allocation in write path

commit 191252837626fca0de694c18bb2aa64c118eda89 upstream.

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")
Signed-off-by: Johan Hovold <johan@kernel.org>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/usb/serial/kobil_sct.c