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.1604051340030.2233-100000@iolanthe.rowland.org>
Date:	Tue, 5 Apr 2016 13:42:20 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Michal Nazarewicz <mina86@...a86.com>
cc:	Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
	Tony Lindgren <tony@...mide.com>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
	Felipe Balbi <felipe.balbi@...ux.intel.com>,
	Bin Liu <b-liu@...com>, <pali.rohar@...il.com>
Subject: Re: [PATCH] usb: f_mass_storage: test whether thread is running
 before starting another

On Tue, 5 Apr 2016, Michal Nazarewicz wrote:

> When binding the function to usb_configuration, check whether the thread
> is running before starting another one.  Without that, when function
> instance is added to multiple configurations, fsg_bing starts multiple
> threads with all but the latest one being forgotten by the driver.  This
> leads to obvious thread leaks, possible lockups when trying to halt the
> machine and possible more issues.
> 
> This fixes issues with legacy/multi¹ gadget as well as configfs gadgets
> when mass_storage function is added to multiple configurations.
> 
> This change also simplifies API since the legacy gadgets no longer need
> to worry about starting the thread by themselves (which was where bug
> in legacy/multi was in the first place).
> 
> ¹ I have no example failure though.  Conclusion that legacy/multi has
>   a bug is based purely on me reading the code.
> 
> Signed-off-by: Michal Nazarewicz <mina86@...a86.com>

This doesn't address the problem I raised in a previous email.  
Sharing one thread among several function instances in the same config
will not work if one of them encounters an error.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ