On Wed, Apr 25, 2012 at 6:52 PM, Oliver Neukum <[email protected]> wrote: > Am Mittwoch, 25. April 2012, 11:14:19 schrieb Ming Lei: >> You need to add check of "usbhid->outtail != usbhid->outhead" above. > > Done. Could you test?
Basically my USB keyboard can work well as before with the patch, but the timeout is not covered since it can't be triggered in my box. > > Regards > Oliver > From 9ff6b78dc59c98b9844dc9922549fd338828a889 Mon Sep 17 00:00:00 2001 > From: Oliver Neukum <[email protected]> > Date: Wed, 25 Apr 2012 12:50:37 +0200 > Subject: [PATCH] usbhid: prevent deadlock during timeout > > On some HCDs usb_unlink_urb() can directly call the > completion handler. That limits the spinlocks that can > be taken in the handler to locks not held while calling > usb_unlink_urb > To prevent a race with resubmission, this patch exposes > usbcore's infrastructure for blocking submission, uses it > and so drops the lock without causing a race in usbhid. > > Signed-off-by: Oliver Neukum <[email protected]> Reported-by: Ming Lei <[email protected]> > --- > drivers/hid/usbhid/hid-core.c | 61 > +++++++++++++++++++++++++++++++++++++---- > drivers/usb/core/urb.c | 30 ++++++++++++++++++++ > include/linux/usb.h | 2 + > 3 files changed, 87 insertions(+), 6 deletions(-) > Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
