From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai3dh-0001Ym-Uk for qemu-devel@nongnu.org; Mon, 21 Mar 2016 13:29:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai3de-0000sM-1h for qemu-devel@nongnu.org; Mon, 21 Mar 2016 13:29:13 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:59424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai3dd-0000rt-Pp for qemu-devel@nongnu.org; Mon, 21 Mar 2016 13:29:09 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Mar 2016 11:29:06 -0600 From: Michael Roth Date: Mon, 21 Mar 2016 12:28:08 -0500 Message-Id: <1458581313-19045-11-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1458581313-19045-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1458581313-19045-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 10/35] ivshmem: remove redundant assignment, fix crash with msi=off List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-stable@nongnu.org, Michael Roth From: Marc-André Lureau Fix crash when msi=false introduced in 660c97ee (msi_vectors is NULL in this case) Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster (cherry picked from commit 47213eb1104709bf238c8d16db20aa47d37b1c59) Signed-off-by: Michael Roth --- hw/misc/ivshmem.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 7d14222..dcfc8cc 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -355,12 +355,9 @@ static CharDriverState* create_eventfd_chr_device(IVShmemState *s, int vector) { /* create a event character device based on the passed eventfd */ - PCIDevice *pdev = PCI_DEVICE(s); int eventfd = event_notifier_get_fd(n); CharDriverState *chr; - s->msi_vectors[vector].pdev = pdev; - chr = qemu_chr_open_eventfd(eventfd); if (chr == NULL) { -- 1.9.1