Re: possible race between reset and error handling in usbhid

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

 



Am Donnerstag, 13. Oktober 2011, 18:20:52 schrieb Jiri Kosina:
> On Wed, 12 Oct 2011, Oliver Neukum wrote:
> 
> > looking at the usbhid code it seems to me that there is no protection
> > between the error handling code and pre_reset() racing.
> > 
> > In particular there seems to be no protection from hid_retry_timeout() calling
> > hid_start_in() which would start IO after hid_pre_reset() has already called
> > hid_cease_io() because that uses del_timer(), not del_timer_sync()
> > 
> > What do you think about this patch?
> 
> Looks like you made a good catch, thanks. Out of curiosity -- did you 
> encounter this happening for real, or have you find out by code reading?

A bit of both. I was looking for causes of a mysterious bug report that
just mentions HID devices and resets and is known to be a race.
So I may have indirectly encountered it.

	Regards
		Oliver
--
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


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux