From patchwork Thu Jan 25 07:12:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 865786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zRv3d2snfz9s74 for ; Thu, 25 Jan 2018 18:36:11 +1100 (AEDT) Received: from localhost ([::1]:50295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eec4u-00021C-2G for incoming@patchwork.ozlabs.org; Thu, 25 Jan 2018 02:36:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eec4K-00020c-7u for qemu-devel@nongnu.org; Thu, 25 Jan 2018 02:35:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eec4H-0000jy-5o for qemu-devel@nongnu.org; Thu, 25 Jan 2018 02:35:32 -0500 Received: from mga11.intel.com ([192.55.52.93]:25189) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eec4G-0000jY-O9 for qemu-devel@nongnu.org; Thu, 25 Jan 2018 02:35:29 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 23:13:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,409,1511856000"; d="scan'208";a="29331086" Received: from debian-xvivbkq.sh.intel.com ([10.67.104.226]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2018 23:13:10 -0800 From: Tiwei Bie To: mst@redhat.com Date: Thu, 25 Jan 2018 15:12:43 +0800 Message-Id: <20180125071243.2720-1-tiwei.bie@intel.com> X-Mailer: git-send-email 2.13.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 Subject: [Qemu-devel] [PATCH] virtio-balloon: unref the memory region before continuing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Tiwei Bie --- hw/virtio/virtio-balloon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 14e08d20d0..f2104bfcef 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -234,6 +234,7 @@ static void virtio_balloon_handle_output(VirtIODevice *vdev, VirtQueue *vq) memory_region_is_rom(section.mr) || memory_region_is_romd(section.mr)) { trace_virtio_balloon_bad_addr(pa); + memory_region_unref(section.mr); continue; }