From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCHv3 1/3] qemu/msi: fix segfault in msix_save Date: Sun, 5 Jul 2009 14:10:47 +0300 Message-ID: <20090705111046.GA4017@redhat.com> References: <20090705102423.GA3833@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, avi@redhat.com, kvm@vger.kernel.org, aliguori@us.ibm.com, kwolf@redhat.com To: Blue Swirl Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34092 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbZGELLg (ORCPT ); Sun, 5 Jul 2009 07:11:36 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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!