public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Subject: bad: scheduling while atomic!
Date: Sun, 15 Jun 2003 14:29:50 +0100	[thread overview]
Message-ID: <20030615142950.A32102@flint.arm.linux.org.uk> (raw)

I'm seeing tonnes of this with UP preempt in 2.5.71.  The following is
just one case which I've been able to track down:

bad: scheduling while atomic! (00000250 0 8 mtdblockd)
[<c02372d0>] (schedule+0x0/0x490) from [<c0335fd0>] (mtd_blktrans_thread+0x220/0x258)
 r7 = 00000000  r6 = C0109FBC  r5 = C0108000  r4 = C0109FB8
[<c0335db0>] (mtd_blktrans_thread+0x0/0x258) from [<c0224554>] (kernel_thread+0x40/0x48)
bad: scheduling while atomic! (00000251 0 8 mtdblockd)
[<c02372d0>] (schedule+0x0/0x490) from [<c0335fd0>] (mtd_blktrans_thread+0x220/0x258)
 r7 = 00000000  r6 = C0109FBC  r5 = C0108000  r4 = C0109FB8
[<c0335db0>] (mtd_blktrans_thread+0x0/0x258) from [<c0224554>] (kernel_thread+0x40/0x48)
bad: scheduling while atomic! (00000252 0 8 mtdblockd)
[<c02372d0>] (schedule+0x0/0x490) from [<c0335fd0>] (mtd_blktrans_thread+0x220/0x258)
 r7 = 00000000  r6 = C0109FBC  r5 = C0108000  r4 = C0109FB8
[<c0335db0>] (mtd_blktrans_thread+0x0/0x258) from [<c0224554>] (kernel_thread+0x40/0x48)

(The extra numbers are: preempt_count, kernel_locked, pid and comm).

This instance seems to be caused by the following code in
drivers/mtd/mtd_blkdevs.c:

         while (!tr->blkcore_priv->exiting) {
                 spin_lock_irq(rq->queue_lock);
 ...
                 spin_unlock_irq(rq->queue_lock);
 ...
                 spin_lock_irq(rq->queue_lock);
 ...
         }

It would be useful if we could balance the spin_locks with the
spin_unlocks. 8)

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


             reply	other threads:[~2003-06-15 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15 13:29 Russell King [this message]
2003-06-15 14:23 ` bad: scheduling while atomic! Jörn Engel
2003-06-15 17:14 ` David Woodhouse
2003-06-15 17:17   ` Russell King
2003-06-15 19:33     ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-02-21  5:17 Lucas Gadani

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=20030615142950.A32102@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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