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: <20100422170207.GA18830@suse.de>
Date:	Thu, 22 Apr 2010 10:02:07 -0700
From:	Greg KH <gregkh@...e.de>
To:	Eric Lescouet <eric.lescouet@....com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"usbip-devel@...ts.sourceforge.net" 
	<usbip-devel@...ts.sourceforge.net>
Subject: Re: [PATCH]: Fix deadlock in USBIP driver (staging),
 linux-2.6.34-rc5

On Thu, Apr 22, 2010 at 06:54:02PM +0200, Eric Lescouet wrote:
> Hi,
> When detaching a port from the client side (usbip --detach 0),
> the event thread, on the server side, is going to deadlock.
> The "eh" server thread is getting USBIP_EH_RESET event and calls:
>  -> stub_device_reset() -> usb_reset_device()
> the USB framework is then calling back _in the same "eh" thread_ :
>  -> stub_disconnect() -> usbip_stop_eh() -> wait_for_completion()
> the "eh" thread is being asleep forever, waiting for its own completion.
> The patch checks if "eh" is the current thread, in usbip_stop_eh().

Ok, but does the lock_kernel() call you just made actually prevent this
from happening?  Isn't there some other lock you can use instead?

> Please Cc me in reply, I'm not in the list.

Also, to have patches that we can apply, we need a "Signed-off-by:"
line.  See the file, Documentation/SubmittingPatches for what this
means.
> 
> b.r.
> 
> ------------------
> 
> diff -Nur linux-2.6.34-rc5/drivers/staging/usbip/usbip_event.c
> linux-2.6.34-rc5.new/drivers/staging/usbip/usbip_event.c
> --- linux-2.6.34-rc5/drivers/staging/usbip/usbip_event.c
> 2010-04-20 01:29:56.000000000 +0200

Your email client wrapped the patch and made it unappliable :(

thanks,

greg k-h
--
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