public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Paul P Komkoff Jr <i@stingr.net>
Cc: linux-kernel@vger.kernel.org, Neil Brown <neilb@cse.unsw.edu.au>,
	Joe Thornber <thornber@redhat.com>
Subject: Re: 2.6.5-mm4
Date: Mon, 12 Apr 2004 01:28:40 -0700	[thread overview]
Message-ID: <20040412012840.1f3a65e2.akpm@osdl.org> (raw)
In-Reply-To: <20040412082215.GP14129@stingr.net>


Please do not edit people out of the Cc line.

Paul P Komkoff Jr <i@stingr.net> wrote:
>
> Replying to Andrew Morton:
> > I added a might_sleep() to generic_unplug_device(), because some drivers'
> > unplug functions can sleep.
> > 
> > It appears that either the EVMS or the udm2 patch is calling
> > generic_unplug_device() under a lock.  Probably spin_lock_irq(q->lock).
> 
> can it be thisi (raid1.c):

Yes.  The below locking is not correct.

> static void unplug_slaves(mddev_t *mddev)
> {
>         conf_t *conf = mddev_to_conf(mddev);
>         int i;
>         unsigned long flags;
> 
>         spin_lock_irqsave(&conf->device_lock, flags);
>         for (i=0; i<mddev->raid_disks; i++) {
>                 mdk_rdev_t *rdev = conf->mirrors[i].rdev;
>                 if (rdev && !rdev->faulty) {
>                         request_queue_t *r_queue = bdev_get_queue(rdev->bdev);
> 
>                         if (r_queue->unplug_fn)
>                                 r_queue->unplug_fn(r_queue);
>                 }
>         }
>         spin_unlock_irqrestore(&conf->device_lock, flags);
> }

I do not know which drivers insist on sleeping in their unplug functions,
but apparently they're out there.

  reply	other threads:[~2004-04-12  8:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-11  3:05 2.6.5-mm4 Andrew Morton
2004-04-12  6:46 ` 2.6.5-mm4 Paul P Komkoff Jr
2004-04-12  7:42   ` 2.6.5-mm4 Andrew Morton
2004-04-12  8:22     ` 2.6.5-mm4 Paul P Komkoff Jr
2004-04-12  8:28       ` Andrew Morton [this message]
2004-04-12  9:10         ` 2.6.5-mm4 Paul P Komkoff Jr
2004-04-12  9:44 ` fix must_not_trace_exec() test (was: 2.6.5-mm4) Olaf Dietsche
2004-04-12 14:18   ` fix must_not_trace_exec() test Andy Lutomirski
2004-04-12 22:02     ` Chris Wright
2004-04-12 10:19 ` 2.6.5-mm4 (hci_usb module unloading oops) Martin Hermanowski
2004-04-12 22:03   ` Greg KH
2004-04-12 22:36     ` Marcel Holtmann
2004-04-12 22:42       ` Greg KH
2004-04-12 22:57         ` Marcel Holtmann
2004-04-19 20:29     ` Martin Hermanowski
2004-04-12 12:24 ` [PATCH] change audit_log_format() -> printk() (was: 2.6.5-mm4) Olaf Dietsche
2004-04-12 17:06 ` 2.6.5-mm4 (compile stats) John Cherry
  -- strict thread matches above, loose matches on Subject: below --
2004-04-12 19:19 2.6.5-mm4 Marcus Hartig
2004-04-12 19:35 ` 2.6.5-mm4 Marc-Christian Petersen
2004-04-12 19:52   ` 2.6.5-mm4 Sam Ravnborg
2004-04-12 19:56 ` 2.6.5-mm4 Sam Ravnborg
2004-04-12 20:15   ` 2.6.5-mm4 Andrew Vasquez
2004-04-13  4:54     ` 2.6.5-mm4 Sam Ravnborg
2004-04-12 20:48   ` 2.6.5-mm4 Marcus Hartig
2004-04-13  2:47     ` 2.6.5-mm4 Michael Baehr
2004-04-13  4:58     ` 2.6.5-mm4 Sam Ravnborg
2004-04-13 15:22 2.6.5-mm4 Andrew Vasquez

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=20040412012840.1f3a65e2.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=i@stingr.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=thornber@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