From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPYxi-00010m-DR for qemu-devel@nongnu.org; Mon, 17 Mar 2014 10:56:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPYxZ-0000KO-Ab for qemu-devel@nongnu.org; Mon, 17 Mar 2014 10:56:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPYxZ-0000Is-2L for qemu-devel@nongnu.org; Mon, 17 Mar 2014 10:56:13 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2HEuAhs001641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Mar 2014 10:56:11 -0400 Date: Mon, 17 Mar 2014 15:56:08 +0100 From: Stefan Hajnoczi Message-ID: <20140317145608.GE4888@stefanha-thinkpad.redhat.com> References: <1394810099-21028-1-git-send-email-stefanha@redhat.com> <53233B8E.1070703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53233B8E.1070703@redhat.com> 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: Paolo Bonzini Cc: Kevin Wolf , qemu-devel@nongnu.org, "Dr. David Alan Gilbert" , Markus Armbruster On Fri, Mar 14, 2014 at 06:25:34PM +0100, Paolo Bonzini wrote: > 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. Okay, let's drop these patches. Stefan