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] [day] [month] [year] [list]
Message-Id: <1198512248.2742.31.camel@imap.mvista.com>
Date:	Mon, 24 Dec 2007 08:04:08 -0800
From:	Daniel Walker <dwalker@...sta.com>
To:	Pete Zaitcev <zaitcev@...hat.com>
Cc:	akpm@...ux-foundation.org, mingo@...e.hu,
	linux-kernel@...r.kernel.org, linux@...mer.net,
	jonathan@...masters.org, matthias.kaehlcke@...il.com,
	kjwinchester@...il.com
Subject: Re: [PATCH 4/4] usb: libusual: locking cleanup

On Mon, 2007-12-24 at 06:12 -0800, Pete Zaitcev wrote:
> On Sun, 23 Dec 2007 08:46:37 -0800, Daniel Walker <dwalker@...sta.com> wrote:
> 
> > I noticed you also have a spinlock held in usu_probe_thread(), the
> > usu_lock.. That spinlock would preclude anything inside request_module()
> > from sleeping..
> 
> The usu_lock is not held across request_module. In fact, it can be
> easily taken from inside request_module, when it invokes modprobe.
> Stop scaring me :-)

Your right, it's just outside .. I still don't think it could deadlock,
since I don't see a code path to recursively get back into those
libusual functions..

> > One thing that has bothered me is that I don't see a reason why this
> > couldn't become a complete, yet you have a comment which says that it
> > can't be a complete.. I honestly didn't understand the comment.. I would
> > imagine that you tried a complete , and it didn't work?
> 
> Yes, it was a completition initially. But suppose you have two storage
> devices, plugged in across a reboot. Two threads are created and have to
> wait until the libusual's init function ends. Since we post one
> completion,
> only one thread continues.

Ok .. The mutex should just prevent them from running at the same time,
but they should both run eventually.

Daniel

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