qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Jie Wang <wangjie88@huawei.com>,
	famz@redhat.com, qemu-block@nongnu.org, eric.fangyi@huawei.com,
	qemu-devel@nongnu.org, wu.wubin@huawei.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2] util/async: avoid NULL pointer dereference
Date: Mon, 18 Jun 2018 18:53:34 +0200	[thread overview]
Message-ID: <20180618165334.GF4667@localhost.localdomain> (raw)
In-Reply-To: <20180618155045.GB9785@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

Am 18.06.2018 um 17:50 hat Stefan Hajnoczi geschrieben:
> On Tue, Jun 12, 2018 at 07:26:25AM +0800, Jie Wang wrote:
> > if laio_init create linux_aio failed and return NULL, NULL pointer
> > dereference will occur when laio_attach_aio_context dereference
> > linux_aio in aio_get_linux_aio. Let's avoid it and report error.
> > 
> > Signed-off-by: Jie Wang <wangjie88@huawei.com>
> > ---
> >  block/file-posix.c | 19 +++++++++++++++++--
> >  util/async.c       |  5 ++++-
> >  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> If someone wants to split aio_get_linux_aio() into an initialization
> function and a "get" function which doesn't return NULL if init
> succeeded, then we can make this a bit cleaner.  But it doesn't matter
> at the moment since there are few callers and duplicating the NULL check
> isn't too bad.
> 
> Thanks, applied to my block tree:
> https://github.com/stefanha/qemu/commits/block

Did you see this patch?

[RFC v2] aio: properly bubble up errors from initialization
Message-Id: <20180615174729.20544-1-naravamudan@digitalocean.com>

I didn't review it yet, but it seems to be for the same, or at least a
similar, problem.

Kevin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2018-06-18 16:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 23:26 [Qemu-devel] [PATCH v2] util/async: avoid NULL pointer dereference Jie Wang
2018-06-12  3:32 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2018-06-14 13:33   ` [Qemu-devel] ping " WangJie (Pluto)
2018-06-18 15:50 ` [Qemu-devel] " Stefan Hajnoczi
2018-06-18 16:53   ` Kevin Wolf [this message]
2018-06-26  2:51   ` WangJie (Pluto)
2018-06-27 12:11     ` Stefan Hajnoczi
2018-06-19  2:15 ` [Qemu-devel] Ping? " WangJie (Pluto)

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=20180618165334.GF4667@localhost.localdomain \
    --to=kwolf@redhat.com \
    --cc=eric.fangyi@huawei.com \
    --cc=famz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wangjie88@huawei.com \
    --cc=wu.wubin@huawei.com \
    /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).