]> git.baikalelectronics.ru Git - kernel.git/commit
USB: usb-skeleton.c: fix blocked forever in skel_read
authorDu Xing <duxing2007@gmail.com>
Wed, 20 Mar 2013 12:47:46 +0000 (20:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 20:32:20 +0000 (13:32 -0700)
commitf8018c537b43e64e61c2f2e6453c4f914cef9cae
treeade4c7d97b3569aa04ec5f48eaa4a22a99583291
parent8b5d15e66f64900e8df5b131bbc0bcbdae88bcb9
USB: usb-skeleton.c: fix blocked forever in skel_read

In skel_read,the reader blocked in wait_for_completion before submit
bulk in urb.
Using processed_urb is for retaining the completion in the case that
previous interruptible wait in skel_read was interrupted and complete
before next skel_read.  Replacing completion with waitqueue can avoid
working around the counting nature of completions
and fix the bug.

Signed-off-by: Du Xing duxing2007@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usb-skeleton.c