qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: linzhecheng <linzhecheng@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"famz@redhat.com" <famz@redhat.com>
Cc: "wangxin (U)" <wangxinxin.wang@huawei.com>
Subject: Re: [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that exit very quickly
Date: Thu, 21 Dec 2017 08:33:11 -0600	[thread overview]
Message-ID: <5c878389-ab69-dfda-8ad3-d5826a24f9f1@redhat.com> (raw)
In-Reply-To: <D9DE8DBB19F2A24080482022C1DE758302C51F05@dggemm509-mbx.china.huawei.com>

On 12/20/2017 09:40 PM, linzhecheng wrote:

>>> If qemu_thread_args is freed here, start_routine(arg) will lead to use
>>> after free because arg equals to qemu_thread_args
>>
>> No, we explicitly copied qemu_thread_args->arg into a local variable prior to
>> freeing qemu_thread_args, so that we do not have to dereference the freed
>> variable.
> OK, that's true.

By the way, your mailer is breaking threading; it is omitting 
'In-Reply-To:' and 'References:' headers, which makes every mail from 
you show up as a new top-level thread, rather than properly threaded to 
what you are responding to.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  reply	other threads:[~2017-12-21 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21  3:40 [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that exit very quickly linzhecheng
2017-12-21 14:33 ` Eric Blake [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-12-21  3:29 linzhecheng
2017-12-21  3:35 ` Eric Blake
2017-12-20 17:14 [Qemu-devel] [PULL 00/46] First batch of misc patches for QEMU 2.12 Paolo Bonzini
2017-12-20 17:14 ` [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that exit very quickly Paolo Bonzini

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=5c878389-ab69-dfda-8ad3-d5826a24f9f1@redhat.com \
    --to=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=linzhecheng@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wangxinxin.wang@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).