public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Greg KH <greg@kroah.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-scsi@vger.kernel.org, Olaf Hering <olh@suse.de>
Subject: Re: Fw: blk_cleanup_queue, sleep in invalid context
Date: Thu, 05 Jan 2006 12:08:15 -0500	[thread overview]
Message-ID: <1136480895.3288.26.camel@mulgrave> (raw)
In-Reply-To: <20060105005609.GA17604@kroah.com>

On Wed, 2006-01-04 at 16:56 -0800, Greg KH wrote:
> You mean, put a might_sleep() in put_device()?  Yes, I can do that, as
> that function might sleep.  SCSI is the culprit here, and I thought that
> the scsi developers had fixed this up already.

No .. I identified one clear culprit which was fixed, but I also said we
have exposure to this all over the place.  Our basic problem is that we
have a complex refcounted model for hosts, devices and commands.  Since
the I/O paths are all accessible from either user or softirq context,
most of these puts will be in potentially illegal places.

We could get out of this by dumping device refcounting and implementing
our own instead, but that really doesn't sound to be the right thing to
do.  Conversely, putting workqueues everywhere to get around this, like
I did for the target handling, is going to get very messy.

James



      parent reply	other threads:[~2006-01-05 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05  0:53 Fw: blk_cleanup_queue, sleep in invalid context Andrew Morton
2006-01-05  0:56 ` Greg KH
2006-01-05  1:12   ` Andrew Morton
2006-01-05 12:52     ` Olaf Hering
2006-01-05 17:08   ` James Bottomley [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=1136480895.3288.26.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=olh@suse.de \
    /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