mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux1394-devel@lists.sourceforge.net,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: deadlock in "modprobe -r ohci1394" shortly after "modprobe ohci1394"
Date: Mon, 20 Nov 2006 21:45:38 +0100	[thread overview]
Message-ID: <456213F2.8070805@s5r6.in-berlin.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0611201425380.7569-100000@iolanthe.rowland.org>

Alan Stern wrote:
> Wait a minute.  Above you agreed that the problem was caused by knodemgrd 
> attempting to rescan the host's _parent_.  So which is the focus of the 
> deadlock: the host or its parent?

The parent of the hpsb_host.

ohci1394 works on a pci_dev which contains a dev, let's call it A.

ieee1394 has a hpsb_host which contains a dev, let's call it B. B's
parent is A. Then there is one or more node_entry with dev C whose
parent is B, end unit_directory with dev D whose parent is C.

The bus of devices B, C, D is set to be ieee1394_bus_type, and that's
what knodemgrd is scanning.

knodemgrd blocks on the semaphore of the parent of B because
driver_detach took the semaphore of A (and of the parent of A if there
is one).

[...]
> If I understand all this, you've got an hpsb_host, directly below which 
> are one or more node_entry's, below each of which may be some 
> unit_directory's.  Right?

Right.

> But how is this relevant if the problem is caused by knodemgrd trying to 
> rescan the hpsb_host's parent?

It's rescanning just the hpsb_host, but you surely got the picture now.

> Is the problem caused by the fact that some of these struct device's 
> aren't bound to a driver?  Remember, bus_rescan_devices() will skip over 
> anything that already has a driver.  Could you solve your problem by 
> adding a do_nothing driver that would bind to these otherwise unused 
> devices?

Excellently, that's what I will try in a minute. It is surely intended
that the hpsb_host can get a driver bound too, but as I mentioned, we
don't have a driver which needs this capability and I don't foresee any
such driver.

Thanks for the directions.
-- 
Stefan Richter
-=====-=-==- =-== =-=--
http://arcgraph.de/sr/

  reply	other threads:[~2006-11-20 20:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-19  0:12 Stefan Richter
2006-11-19 14:23 ` Stefan Richter
2006-11-19 19:54   ` Alan Stern
2006-11-19 21:55     ` Stefan Richter
2006-11-20 19:31       ` Alan Stern
2006-11-20 20:45         ` Stefan Richter [this message]
2006-11-20 21:28           ` Alan Stern
2006-11-21  0:21             ` Stefan Richter
2006-11-21  0:49               ` Alan Stern
2006-11-21  8:05                 ` Stefan Richter
2006-11-21 21:50                   ` [PATCH] ieee1394: nodemgr: fix deadlock in shutdown Stefan Richter
2006-11-22  2:02                     ` Alan Stern
2006-11-22 20:09                       ` Stefan Richter
2006-11-20  3:41     ` deadlock in "modprobe -r ohci1394" shortly after "modprobe ohci1394" Dmitry Torokhov
2006-11-20 19:18       ` Alan Stern

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=456213F2.8070805@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    /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

Powered by JetHome