From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: [PATCH] hid: usbhid: fix possible deadlock in __usbhid_submit_report Date: Mon, 23 Apr 2012 10:24:58 +0200 Message-ID: <201204231024.58168.oneukum@suse.de> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ming Lei Cc: Alan Stern , Greg Kroah-Hartman , Jiri Kosina , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-input@vger.kernel.org Am Sonntag, 22. April 2012, 13:53:32 schrieb Ming Lei: > >> Then we can have a uniform lock requirement and no changes are inv= olved > >> on host controller drivers. > > > > The return values would not be correct. >=20 > If you run 'git grep -n usb_unlink_urb drivers/usb/', it may show tha= t > most of callers do not check its return value, and the others only ch= eck > for dumping warnings. If usb_unlink_urb is converted into tasklet > implementation, we still can dump these warnings inside its tasklet f= unction. That is a very bad idea. You make implementing a proper reference count= next to impossible this way. And it makes no sense. If you use a work queue = you can use usb_kill_urb() anyway. Regards Oliver --=20 - - -=20 SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6= rffer, HRB 16746 (AG N=FCrnberg)=20 Maxfeldstra=DFe 5 =20 90409 N=FCrnberg=20 Germany=20 - - -=20 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html