qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] dataplane: fix bogus coverity warnings
Date: Fri, 14 Mar 2014 18:25:34 +0100	[thread overview]
Message-ID: <53233B8E.1070703@redhat.com> (raw)
In-Reply-To: <1394810099-21028-1-git-send-email-stefanha@redhat.com>

Il 14/03/2014 16:14, Stefan Hajnoczi ha scritto:
> Coverity detects when variable are accessed under a mutex most of the time.  It
> warns when they are not accessed under the mutex.  I initialized variables
> before the mutex and threads that access them even exist - Coverity doesn't
> like that.  Fix the code.
>
> Stefan Hajnoczi (2):
>   iothread: fix bogus coverity warning
>   rfifolock: fix bogus coverity warning
>
>  iothread.c       | 5 ++++-
>  util/rfifolock.c | 4 +++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
>

Nah, I think Coverity is wrong.  It should detect initialization of the 
mutex, and treat surrounding code as single-threaded.  I silenced the 
defects in the report, like others before.

Paolo

  parent reply	other threads:[~2014-03-14 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 15:14 [Qemu-devel] [PATCH 0/2] dataplane: fix bogus coverity warnings Stefan Hajnoczi
2014-03-14 15:14 ` [Qemu-devel] [PATCH 1/2] iothread: fix bogus coverity warning Stefan Hajnoczi
2014-03-14 15:14 ` [Qemu-devel] [PATCH 2/2] rfifolock: " Stefan Hajnoczi
2014-03-14 17:25 ` Paolo Bonzini [this message]
2014-03-17 14:56   ` [Qemu-devel] [PATCH 0/2] dataplane: fix bogus coverity warnings Stefan Hajnoczi

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=53233B8E.1070703@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).