From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Frediano Ziglio <freddy77@gmail.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Jim Meyering <jim@meyering.net>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] posix-aio: don't set aiocb->ret/active outside critical section
Date: Tue, 15 May 2012 13:49:37 +0200 [thread overview]
Message-ID: <4FB242D1.7040705@redhat.com> (raw)
In-Reply-To: <4FB23F3E.4000700@redhat.com>
Il 15/05/2012 13:34, Kevin Wolf ha scritto:
>> static void qemu_paio_submit(struct qemu_paiocb *aiocb)
>> {
>> + mutex_lock(&lock);
>> aiocb->ret = -EINPROGRESS;
>> aiocb->active = 0;
>> - mutex_lock(&lock);
>> if (idle_threads == 0 && cur_threads < max_threads)
>> spawn_thread();
>> QTAILQ_INSERT_TAIL(&request_list, aiocb, node);
>> mutex_unlock(&lock);
>> cond_signal(&cond);
>> }
>
> This is just silencing coverity, not really fixing a bug, right? aiocb
> is inserted into request_lists only afterwards, and before it is in the
> list, other threads can't find it.
Indeed... I don't like the patch, the access is out of the lock for a
reason.
Paolo
next prev parent reply other threads:[~2012-05-15 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 11:27 [Qemu-devel] [PATCH] posix-aio: don't set aiocb->ret/active outside critical section Jim Meyering
2012-05-15 11:34 ` Kevin Wolf
2012-05-15 11:49 ` Paolo Bonzini [this message]
2012-05-15 12:46 ` Jim Meyering
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=4FB242D1.7040705@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=freddy77@gmail.com \
--cc=jim@meyering.net \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.