mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: akpm@linux-foundation.org, mingo@elte.hu,
	linux-kernel@vger.kernel.org, linux@bohmer.net,
	jonathan@jonmasters.org, matthias.kaehlcke@gmail.com,
	kjwinchester@gmail.com
Subject: Re: [PATCH 4/4] usb: libusual: locking cleanup
Date: Mon, 24 Dec 2007 08:04:08 -0800	[thread overview]
Message-ID: <1198512248.2742.31.camel@imap.mvista.com> (raw)
In-Reply-To: <20071224061220.ceed2bf8.zaitcev@redhat.com>

On Mon, 2007-12-24 at 06:12 -0800, Pete Zaitcev wrote:
> On Sun, 23 Dec 2007 08:46:37 -0800, Daniel Walker <dwalker@mvista.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


      reply	other threads:[~2007-12-24 16:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071221205848.989157559@mvista.com>
2007-12-21  8:00 ` [PATCH 1/4] usb microtek: remove unused semaphore Daniel Walker
2007-12-21  8:00 ` [PATCH 2/4] prism54: remove questionable down_interruptible usage Daniel Walker
2007-12-21  8:00 ` [PATCH 3/4] docs: convert kref semaphore to mutex Daniel Walker
2007-12-21 21:33   ` Corey Minyard
2007-12-21  8:00 ` [PATCH 4/4] usb: libusual: locking cleanup Daniel Walker
2007-12-22  4:22   ` Andrew Morton
2007-12-22  6:24   ` Pete Zaitcev
2007-12-22  6:31     ` Andrew Morton
2007-12-22 17:01     ` Daniel Walker
2007-12-23  7:37       ` Pete Zaitcev
2007-12-23 16:46         ` Daniel Walker
2007-12-24 14:12           ` Pete Zaitcev
2007-12-24 16:04             ` Daniel Walker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1198512248.2742.31.camel@imap.mvista.com \
    --to=dwalker@mvista.com \
    --cc=akpm@linux-foundation.org \
    --cc=jonathan@jonmasters.org \
    --cc=kjwinchester@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@bohmer.net \
    --cc=matthias.kaehlcke@gmail.com \
    --cc=mingo@elte.hu \
    --cc=zaitcev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®