Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Reuben Farrelly <reuben-lkml@reub.net>
Cc: neilb@suse.de, linux-kernel@vger.kernel.org, n@suse.de,
	Alan Stern <stern@rowland.harvard.edu>,
	James Bottomley <James.Bottomley@steeleye.com>,
	linux-scsi@vger.kernel.org
Subject: Re: 2.6.14-mm1
Date: Mon, 7 Nov 2005 10:52:57 -0800	[thread overview]
Message-ID: <20051107105257.333248c0.akpm@osdl.org> (raw)
In-Reply-To: <436F3020.1040209@reub.net>

Reuben Farrelly <reuben-lkml@reub.net> wrote:
>
>  Debug: sleeping function called from invalid context at include/asm/semaphore.h:99
>  in_atomic():1, irqs_disabled():1
>    [<c0103c46>] dump_stack+0x17/0x19
>    [<c011a173>] __might_sleep+0x9c/0xae
>    [<c028f82b>] scsi_disk_get_from_dev+0x15/0x48
>    [<c029006e>] sd_prepare_flush+0x17/0x5a
>    [<c027f8ff>] scsi_prepare_flush_fn+0x30/0x33
>    [<c0259da0>] blk_start_pre_flush+0xd5/0x13f
>    [<c025936b>] elv_next_request+0x113/0x170
>    [<c027fd45>] scsi_request_fn+0x4b/0x2fd
>    [<c025b393>] blk_run_queue+0x2b/0x3c
>    [<c027f0b3>] scsi_run_queue+0xa4/0xb6
>    [<c027f11f>] scsi_next_command+0x16/0x19
>    [<c027f1db>] scsi_end_request+0x93/0xc5
>    [<c027f494>] scsi_io_completion+0x141/0x46b
>    [<c02901e9>] sd_rw_intr+0x117/0x22b
>    [<c027ae5f>] scsi_finish_command+0x7f/0x93
>    [<c027ad43>] scsi_softirq+0xa8/0x11a
>    [<c0121eb8>] __do_softirq+0x88/0x141
>    [<c0104fd9>] do_softirq+0x77/0x81
>    =======================
>    [<c012205a>] irq_exit+0x48/0x4a
>    [<c0104e84>] do_IRQ+0x74/0xa7
>    [<c010374e>] common_interrupt+0x1a/0x20
>    [<f8918c04>] acpi_processor_idle+0x11f/0x2c7 [processor]
>    [<c0100d71>] cpu_idle+0x49/0xa0
>    [<c01002d7>] rest_init+0x37/0x39
>    [<c03fd8c5>] start_kernel+0x166/0x179
>    [<c0100210>] 0xc0100210

ah-hah, that's a different trace.

sd_issue_flush() has been altered to run scsi_disk_get_from_dev(), which
takes a semaphore.  It does this from within spinlock and, as we see here,
from within softirq.

Methinks the people who developed and tested that patch forgot to enable
CONFIG_PREEMPT, CONFIG_DEBUG_KERNEL, CONFIG_DEBUG_SLAB,
CONFIG_DEBUG_SPINLOCK and CONFIG_DEBUG_SPINLOCK_SLEEP.


       reply	other threads:[~2005-11-07 18:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051106182447.5f571a46.akpm@osdl.org>
     [not found] ` <436F2452.9020207@reub.net>
     [not found]   ` <20051107020905.69c0b6dc.akpm@osdl.org>
     [not found]     ` <17263.11214.992300.34384@cse.unsw.edu.au>
     [not found]       ` <20051107023723.5cf63393.akpm@osdl.org>
     [not found]         ` <436F3020.1040209@reub.net>
2005-11-07 18:52           ` Andrew Morton [this message]
2005-11-07 19:27             ` 2.6.14-mm1 Alan Stern
2005-11-07 21:43             ` 2.6.14-mm1 J.A. Magallon
2005-11-08  0:07               ` 2.6.14-mm1 J.A. Magallon
2005-11-08 14:21             ` 2.6.14-mm1 James Bottomley
2005-11-09  0:30               ` 2.6.14-mm1 Reuben Farrelly

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=20051107105257.333248c0.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=n@suse.de \
    --cc=neilb@suse.de \
    --cc=reuben-lkml@reub.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