lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0805211057590.2490-100000@iolanthe.rowland.org>
Date:	Wed, 21 May 2008 10:58:59 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	David Vrabel <david.vrabel@....com>
cc:	Oliver Neukum <oliver@...kum.org>, Jiri Kosina <jkosina@...e.cz>,
	Greg KH <greg@...ah.com>, <linux-usb@...r.kernel.org>,
	<lchiquitto@...ell.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] USB: fix deadlock in HCD code

On Wed, 21 May 2008, David Vrabel wrote:

> Alan Stern wrote:
> > On Wed, 21 May 2008, David Vrabel wrote:
> > 
> >> Alan Stern wrote:
> >>> The functions you are worried about (usb_hcd_link_urb_to_ep and 
> >>> usb_hcd_unlink_urb_from_ep) are documented as requiring that interrupts 
> >>> be disabled by their callers.  This patch isn't needed.
> >> This requirement is the only reason the whci-hcd driver disables
> >> interrupts.  Removing this requirement would reduce the time that
> >> interrupts are disabled in the whci-hcd driver.
> > 
> > That doesn't sound like a valid approach.  If you don't disable
> > interrupts then you aren't protected against an interrupt handler
> > submitting an URB and accessing your data structures while whci-hcd is
> > in the middle of updating them.
> 
> I can't see how urbs can be submitted to whci-hcd from an interrupt
> handler (urb callbacks are always called from a workqueue thread)

_Your_ callbacks are always called from a workqueue thread.  Another 
driver's callbacks might not be, and that other driver might submit an 
URB.  Or unlink one.

> but
> they could be submitted from a timer, so you are correct.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ