linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Borislav Petkov <bp@alien8.de>, Jens Axboe <jaxboe@fusionio.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.6.39-rc3
Date: Thu, 14 Apr 2011 13:55:02 -0700	[thread overview]
Message-ID: <BANLkTi=h+NL+qqMDBNvOUmVDonORf4Qx2A@mail.gmail.com> (raw)
In-Reply-To: <20110414202445.GA6173@liondog.tnic>

On Thu, Apr 14, 2011 at 1:24 PM, Borislav Petkov <bp@alien8.de> wrote:
>
> Yep, I had to hit a buglet too. Looks like block layer, ->request_fn
> (do_ide_request) called in IRQ disabled region. Process is blkid, i.e.
> some udev helper. Kernel is -rc3 + Joerg's USB quirk fix which should be
> unrelated.

I think this particular backtrace should be fixed by commit
6631e635c65d ("block: don't flush plugged IO on forced preemtion
scheduling"), although even without preempt scheduling, I don't think
it's at all ok to sleep inside __blk_run_queue.

Jens? Even from a _regular_ schedule, it would not be ok if we end up
sleeping - we're caching things like the request-queue, and we have
preempt_disable() inside the scheduler for a very good reason.

So if the unplugging can cause sleeping, that's a problem. See the

        /* HLD do_request() callback might sleep, make sure it's okay */
        might_sleep();

comment in drivers/ide/ide-io.c. Hmm?

                    Linus

---
> Happens when I put a cd in the drive. More info upon request.
>
> [20933.365059] BUG: sleeping function called from invalid context at drivers/ide/ide-io.c:468
> [20933.365113] in_atomic(): 1, irqs_disabled(): 0, pid: 5817, name: blkid
> [20933.365166] no locks held by blkid/5817.
> [20933.365193] Pid: 5817, comm: blkid Not tainted 2.6.39-rc3-00001-g1b521ee #9
> [20933.365228] Call Trace:
> [20933.365282]  [<ffffffff8102db2b>] __might_sleep+0x103/0x108
> [20933.365312]  [<ffffffff812e61c8>] do_ide_request+0x4a/0x58e
> [20933.365362]  [<ffffffff811951af>] ? cfq_prio_tree_add+0xb3/0xc2
> [20933.365390]  [<ffffffff811974f3>] ? cfq_add_rq_rb+0xb1/0xc5
> [20933.365437]  [<ffffffff81197579>] ? cfq_insert_request+0x72/0x433
> [20933.365465]  [<ffffffff81187fd8>] __blk_run_queue+0x80/0xee
> [20933.365511]  [<ffffffff81188141>] flush_plug_list+0xfb/0x139
> [20933.365540]  [<ffffffff810a9a86>] ? sleep_on_page+0x12/0x12
> [20933.365586]  [<ffffffff81188199>] __blk_flush_plug+0x1a/0x3a
> [20933.365613]  [<ffffffff81442913>] schedule+0x3d2/0xb4b
> [20933.365663]  [<ffffffff811a2cee>] ? trace_hardirqs_on_thunk+0x3a/0x3f
> [20933.365692]  [<ffffffff8100387f>] ? do_softirq+0x77/0x85
> [20933.365739]  [<ffffffff81446244>] ? retint_restore_args+0xe/0xe
> [20933.365767]  [<ffffffff810a9a86>] ? sleep_on_page+0x12/0x12
> [20933.365812]  [<ffffffff81443377>] preempt_schedule+0x37/0x4b
> [20933.365839]  [<ffffffff81445f92>] _raw_spin_unlock_irqrestore+0x64/0x69
> [20933.365878]  [<ffffffff81057b3b>] prepare_to_wait_exclusive+0x6c/0x77
> [20933.365925]  [<ffffffff81443806>] __wait_on_bit_lock+0x34/0x8f
> [20933.365953]  [<ffffffff810a9a00>] __lock_page_killable+0x66/0x6d
> [20933.366000]  [<ffffffff810579a1>] ? autoremove_wake_function+0x3d/0x3d
> [20933.366090]  [<ffffffff810ab56d>] generic_file_aio_read+0x491/0x67c
> [20933.366123]  [<ffffffff810e8137>] do_sync_read+0xcb/0x108
> [20933.366183]  [<ffffffff81068f4d>] ? trace_hardirqs_on+0xd/0xf
> [20933.366217]  [<ffffffff810e8bce>] vfs_read+0xb3/0x13b
> [20933.366270]  [<ffffffff810e8d1f>] sys_read+0x4d/0x77
> [20933.366303]  [<ffffffff81446aeb>] system_call_fastpath+0x16/0x1b
>
> Thanks.
>
> --
> Regards/Gruss,
>    Boris.
>

  reply	other threads:[~2011-04-14 20:55 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12  0:40 Linux 2.6.39-rc3 Linus Torvalds
2011-04-12  9:02 ` Joerg Roedel
2011-04-12 14:15   ` Alex Deucher
2011-04-12 18:44     ` Joerg Roedel
2011-04-13  1:27       ` David Rientjes
2011-04-13  6:46       ` Ingo Molnar
2011-04-13 17:21         ` Joerg Roedel
2011-04-13 18:39           ` H. Peter Anvin
2011-04-13 19:26             ` Joerg Roedel
2011-04-13 18:51           ` H. Peter Anvin
2011-04-13 19:24             ` Joerg Roedel
2011-04-13 19:14           ` Yinghai Lu
2011-04-13 19:34             ` Joerg Roedel
2011-04-13 20:48               ` Yinghai Lu
2011-04-13 20:54                 ` Linus Torvalds
2011-04-13 21:23                   ` Yinghai Lu
2011-04-13 23:39                     ` Linus Torvalds
2011-04-14  0:10                       ` Yinghai Lu
2011-04-14  2:03                       ` H. Peter Anvin
2011-04-14  2:27                         ` Linus Torvalds
2011-04-14  2:33                           ` Linus Torvalds
2011-04-14  4:03                             ` Tejun Heo
2011-04-14  9:36                               ` Joerg Roedel
2011-04-14  8:09                             ` Alan Cox
2011-04-15 13:11                             ` Joerg Roedel
2011-04-15 13:16                               ` Ingo Molnar
2011-04-15 14:33                                 ` Joerg Roedel
2011-04-15 16:11                                   ` Alex Deucher
2011-04-15 15:46                                 ` Joerg Roedel
2011-04-15 16:11                                   ` Jerome Glisse
2011-04-16 16:35                                     ` Joerg Roedel
2011-04-16 18:54                                       ` Jerome Glisse
2011-04-17 14:09                                         ` Joerg Roedel
2011-04-18  1:12                                           ` Jerome Glisse
2011-04-18 15:23                                           ` Alex Deucher
2011-04-18 15:29                                             ` Jerome Glisse
2011-04-18 15:33                                               ` Alex Deucher
2011-04-18 15:59                                                 ` Jerome Glisse
2011-04-18 16:35                                                   ` Alex Deucher
2011-04-15 14:04                               ` Andreas Herrmann
2011-04-15 14:28                                 ` Joerg Roedel
2011-04-15 14:16                               ` Alexandre Demers
2011-04-15 14:27                                 ` Joerg Roedel
2011-04-15 18:59                                   ` Alexandre Demers
2011-04-15 19:06                                     ` Ingo Molnar
2011-04-15 19:18                                       ` Yinghai Lu
2011-04-15 20:22                                         ` H. Peter Anvin
2011-04-16 12:01                                         ` Joerg Roedel
2011-04-16 12:00                                       ` Joerg Roedel
2011-04-16 12:21                                         ` Ingo Molnar
2011-04-16  0:03                               ` [tip:x86/urgent] x86, amd: Disable GartTlbWlkErr when BIOS forgets it tip-bot for Joerg Roedel
2011-05-06 21:17                           ` Linux 2.6.39-rc3 Linus Torvalds
2011-04-13 21:50                 ` Joerg Roedel
2011-04-13 21:59                   ` Yinghai Lu
2011-04-13 22:11                     ` H. Peter Anvin
2011-04-13 22:01                   ` H. Peter Anvin
2011-04-13 22:22                     ` Joerg Roedel
2011-04-13 22:31                       ` H. Peter Anvin
2011-04-14  8:59                         ` Joerg Roedel
2011-04-13 19:48             ` Alex Deucher
2011-04-14  1:58             ` H. Peter Anvin
2011-04-14  2:07               ` Dave Airlie
2011-04-14  6:10                 ` H. Peter Anvin
2011-04-14  8:56               ` Joerg Roedel
2011-04-14  9:07                 ` Dave Airlie
2011-04-14  9:11                 ` Ingo Molnar
2011-04-14 14:31                   ` H. Peter Anvin
2011-04-14 14:28                 ` Alex Deucher
2011-04-14 21:09                   ` Joerg Roedel
2011-04-14 21:34                     ` Alex Deucher
2011-04-15  6:50                       ` Joerg Roedel
2011-04-15 14:49                       ` Andreas Herrmann
2011-04-15  8:26                     ` Michel Dänzer
2011-04-15  8:55                       ` Joerg Roedel
2011-04-12 19:09 ` Dave Jones
2011-04-12 19:21   ` Dave Jones
2011-04-12 19:55     ` Linus Torvalds
2011-04-12 20:13       ` Dave Jones
2011-04-14  8:20     ` Aneesh Kumar K.V
2011-04-18 22:57       ` Kay Sievers
2011-04-18 23:02         ` Dave Jones
2011-04-18 23:14           ` Kay Sievers
2011-04-19 11:42           ` Ted Ts'o
2011-04-19  8:23         ` Aneesh Kumar K.V
2011-04-19  8:37           ` Steven Whitehouse
2011-04-19  9:55           ` Kay Sievers
2011-04-12 20:20   ` Eric Sandeen
2011-04-12 20:27     ` Karel Zak
2011-04-12 20:33     ` Linus Torvalds
2011-04-14 20:24 ` Borislav Petkov
2011-04-14 20:55   ` Linus Torvalds [this message]
2011-04-15  4:14     ` Christoph Hellwig
2011-04-20 20:12       ` Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2011-04-13  4:32 George Spelvin
2011-04-13 14:54 ` Linus Torvalds
2011-04-14 18:28   ` Pavel Machek

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='BANLkTi=h+NL+qqMDBNvOUmVDonORf4Qx2A@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=jaxboe@fusionio.com \
    --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;
as well as URLs for NNTP newsgroup(s).