From: Jeff Moyer <jmoyer@redhat.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
virtualization@lists.linux-foundation.org,
linux-block@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] virtio_blk: fix panic in initialization error path
Date: Mon, 09 Jan 2017 14:55:56 -0500 [thread overview]
Message-ID: <x49zij0gg8j.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <4bc0f759ce198dc36e9b678a3c8f69bfef5cb728.1483990999.git.osandov@fb.com> (Omar Sandoval's message of "Mon, 9 Jan 2017 11:44:12 -0800")
Omar Sandoval <osandov@osandov.com> writes:
> From: Omar Sandoval <osandov@fb.com>
>
> If blk_mq_init_queue() returns an error, it gets assigned to
> vblk->disk->queue. Then, when we call put_disk(), we end up calling
> blk_put_queue() with the ERR_PTR, causing a bad dereference. Fix it by
> only assigning to vblk->disk->queue on success.
>
> Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
next prev parent reply other threads:[~2017-01-09 19:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 19:44 [PATCH] virtio_blk: fix panic in initialization error path Omar Sandoval
2017-01-09 19:55 ` Jeff Moyer [this message]
2017-01-10 2:47 ` Jason Wang
2017-01-10 4:10 ` Michael S. Tsirkin
2017-01-10 4:11 ` Jens Axboe
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=x49zij0gg8j.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=jasowang@redhat.com \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=mst@redhat.com \
--cc=osandov@osandov.com \
--cc=virtualization@lists.linux-foundation.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).