Custom Search

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, Apr 27, 2012 at 12:44:57AM +0200, Jiri Kosina wrote:
> On Wed, 25 Apr 2012, Alan Stern wrote:
> 
> > On Wed, 25 Apr 2012, Oliver Neukum wrote:
> > 
> > > From 9ff6b78dc59c98b9844dc9922549fd338828a889 Mon Sep 17 00:00:00 2001
> > > From: Oliver Neukum <oliver@xxxxxxxxxx>
> > > 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.
> > 
> > > Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
> > > ---
> > >  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 <jkosina@xxxxxxx>
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux