From: Jens Axboe <axboe@kernel.dk>
To: Tejun Heo <tj@kernel.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Jiri Slaby <jirislaby@gmail.com>
Subject: Re: [PATCH block/for-next] block: don't call blk_drain_queue() if elevator is not up
Date: Thu, 03 Nov 2011 18:49:53 +0100 [thread overview]
Message-ID: <4EB2D441.9040708@kernel.dk> (raw)
In-Reply-To: <20111103162634.GK4417@google.com>
On 2011-11-03 17:26, Tejun Heo wrote:
> blk_cleanup_queue() may be called before elevator is set up on a
> queue which triggers the following oops.
>
> BUG: unable to handle kernel NULL pointer dereference at (null)
> IP: [<ffffffff8125a69c>] elv_drain_elevator+0x1c/0x70
> ...
> Pid: 830, comm: kworker/0:2 Not tainted 3.1.0-next-20111025_64+ #1590
> Bochs Bochs
> RIP: 0010:[<ffffffff8125a69c>] [<ffffffff8125a69c>] elv_drain_elevator+0x1c/0x70
> ...
> Call Trace:
> [<ffffffff8125da92>] blk_drain_queue+0x42/0x70
> [<ffffffff8125db90>] blk_cleanup_queue+0xd0/0x1c0
> [<ffffffff81469640>] md_free+0x50/0x70
> [<ffffffff8126f43b>] kobject_release+0x8b/0x1d0
> [<ffffffff81270d56>] kref_put+0x36/0xa0
> [<ffffffff8126f2b7>] kobject_put+0x27/0x60
> [<ffffffff814693af>] mddev_delayed_delete+0x2f/0x40
> [<ffffffff81083450>] process_one_work+0x100/0x3b0
> [<ffffffff8108527f>] worker_thread+0x15f/0x3a0
> [<ffffffff81089937>] kthread+0x87/0x90
> [<ffffffff81621834>] kernel_thread_helper+0x4/0x10
>
> Fix it by making blk_cleanup_queue() check whether q->elevator is set
> up before invoking blk_drain_queue.
Thanks, glad this got caught before the merge...
--
Jens Axboe
next prev parent reply other threads:[~2011-11-03 17:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 16:08 NULL ptr deref at elv_drain_elevator Jiri Slaby
2011-11-03 16:14 ` Tejun Heo
2011-11-03 16:16 ` Jiri Slaby
2011-11-03 16:26 ` [PATCH block/for-next] block: don't call blk_drain_queue() if elevator is not up Tejun Heo
2011-11-03 17:49 ` Jens Axboe [this message]
2011-11-03 21:12 ` Tejun Heo
2011-11-04 8:12 ` Jens Axboe
2011-11-04 14:26 ` Tejun Heo
2011-11-04 14:28 ` Jens Axboe
2011-11-04 14:30 ` Tejun Heo
2011-11-04 9:40 ` Stefan Richter
2011-11-04 14:38 ` Tejun Heo
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=4EB2D441.9040708@kernel.dk \
--to=axboe@kernel.dk \
--cc=jejb@parisc-linux.org \
--cc=jirislaby@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tj@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