Thread (3 messages) 3 messages, 3 authors, 2012-04-26

Re: [PATCH] hid: usbhid: fix possible deadlock in __usbhid_submit_report

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2012-04-26 23:40:55

Possibly related (same subject, not in this thread)

On Fri, Apr 27, 2012 at 12:44:57AM +0200, Jiri Kosina wrote:
On Wed, 25 Apr 2012, Alan Stern wrote:
quoted
On Wed, 25 Apr 2012, Oliver Neukum wrote:
quoted
From 9ff6b78dc59c98b9844dc9922549fd338828a889 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@neukum.org>
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.
Simply preventing resubmission is a good idea.
quoted
Signed-off-by: Oliver Neukum <redacted>
---
 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(-)
This should be split into two patches: one for usbhid and one for 
usbcore.
Alternatively you can use my

	Acked-by: Jiri Kosina [off-list ref]

for the usbhid part and apply through USB tree.

Thanks everybody,
Wait, was this really a valid solution here?  If so, can someone bounce
this to me...

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help