From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNPdJ-0006mU-DM for qemu-devel@nongnu.org; Sun, 05 Jul 2009 07:11:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNPdE-0006kp-4K for qemu-devel@nongnu.org; Sun, 05 Jul 2009 07:11:44 -0400 Received: from [199.232.76.173] (port=48649 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNPdE-0006kj-0C for qemu-devel@nongnu.org; Sun, 05 Jul 2009 07:11:40 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43692) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNPdD-000309-Lz for qemu-devel@nongnu.org; Sun, 05 Jul 2009 07:11:39 -0400 Date: Sun, 5 Jul 2009 14:10:47 +0300 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCHv3 1/3] qemu/msi: fix segfault in msix_save Message-ID: <20090705111046.GA4017@redhat.com> References: <20090705102423.GA3833@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: kwolf@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com On Sun, Jul 05, 2009 at 01:46:53PM +0300, Blue Swirl wrote: > On 7/5/09, Michael S. Tsirkin wrote: > > This fixes segfault reported by Kevin Wolf, > > and simplifies the code in msix_save. > > > + if (!dev->cap_present & QEMU_PCI_CAP_MSIX) > > + return; > > Dubious: !x & y. You also forgot the braces. Yes. Happens to work because QEMU_PCI_CAP_MSIX is 0x1. I'll fix that, thanks!