From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOVrg-0000rF-GM for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:25:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOVrX-0000ru-Mw for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:25:48 -0400 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:44421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOVrX-0000rh-5x for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:25:39 -0400 Received: by mail-ee0-f48.google.com with SMTP id b57so978548eek.7 for ; Fri, 14 Mar 2014 10:25:38 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53233B8E.1070703@redhat.com> Date: Fri, 14 Mar 2014 18:25:34 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1394810099-21028-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1394810099-21028-1-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] dataplane: fix bogus coverity warnings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , "Dr. David Alan Gilbert" 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