From patchwork Mon Jul 23 20:17:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 10541133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA5FD180E for ; Mon, 23 Jul 2018 21:41:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAA92285BE for ; Mon, 23 Jul 2018 21:41:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EC3C285C8; Mon, 23 Jul 2018 21:41:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 463CD285BE for ; Mon, 23 Jul 2018 21:41:15 +0000 (UTC) Received: from localhost ([::1]:36874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhiZu-0002f6-Ce for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 17:41:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhLE-0004Q4-2k for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:22:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhLD-0005gc-4g for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:59 -0400 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:39371) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhLC-0005gM-Us; Mon, 23 Jul 2018 16:21:59 -0400 Received: by mail-oi0-x235.google.com with SMTP id d189-v6so3490426oib.6; Mon, 23 Jul 2018 13:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=oAlSN3aovbzYgH1i2BDjkdCAxHzSEFSOL/6OpmZBUnU=; b=ON6wYdSgBsiv6H11belnQTiGeJ18Tyypw6GPn7d2hz2osWimo9bybRvkdThMkq3RPL aJknTT0/Ph3Ep21pHaCaZ/EJDBn+8DCLcbskUejg3aJm2uTa+S32ANuyu4MnzNfbz7/q /Ty7Wc5nR+lzEaMaiaU4nRFlxWH+5SjyHkfGt/HpzLWy9N5gFDzbirG1beCtR5ozCs++ SASo6LcDXVimSizBUZaCZxQ6FZK3S4I7+DwFysg7d/8e2D4RvzK/pDoU1qKwzHOnbWGW HrcXdjn2OYpgz4rkr6VZxL3Zg9zYJKHnYr9A0OucXYuZdEEunBThGNtE/WcqioBmdHp3 yQRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=oAlSN3aovbzYgH1i2BDjkdCAxHzSEFSOL/6OpmZBUnU=; b=RBpFfopCSE6Kc3N1mLUpVtbRDNvU8OYi9TJYCkzGZAcfeB0KK+1IQR8GSZzEPgQJGs aXNA9bmKKNc811ylt/4Xm8sQ124RRN0a5dsBaH9NEv8bZW+fH4eKeeENY2OIsjrSyOOR 3w8FRMByOMDEobMQOQiosRGdgW9BVL2TJmN3aOnBPK2KNm6oIZ7xVKXoAZO3Ax7n6BJA 7ahXeHNCLKiMtMOZ7zyqkLSNeVpmw1SFf5n17AsBy++EQc8ih/WtAvqgpx/x6r3Mr1as i8VKwkInKmBZSJi4ez/6YmKllrxsvurITNjSte5/VQTbylU07JTSw2RuhJWjPbzjig+/ Lp/g== X-Gm-Message-State: AOUpUlHTmRhx1fvqQ8VFL3evSOUamrtpZyKb9rZYeA/PLZ8jFHOUI6kY bAYVQl4qede6tYxGZR4zVwMwMXbIRF+Zsg== X-Google-Smtp-Source: AAOMgpfWPZn1J/sy3LRDpYpU/dWPXrSLrzCQjTY1og7VHtt59eoRzPFDj2HU28K4UR9G5tq2EOVWVw== X-Received: by 2002:aca:fd01:: with SMTP id b1-v6mr253538oii.307.1532377317818; Mon, 23 Jul 2018 13:21:57 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id r133-v6sm7512308oia.33.2018.07.23.13.21.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:21:56 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:40 -0500 Message-Id: <20180723201748.25573-92-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::235 Subject: [Qemu-devel] [PATCH 91/99] migration/block-dirty-bitmap: fix dirty_bitmap_load 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: Vladimir Sementsov-Ogievskiy , qemu-stable@nongnu.org, "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Sementsov-Ogievskiy dirty_bitmap_load_header return code is obtained but not handled. Fix this. Bug was introduced in b35ebdf076d697bc "migration: add postcopy migration of dirty bitmaps" with the whole function. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20180530112424.204835-1-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Dr. David Alan Gilbert (cherry picked from commit a36f6ff46f115672cf86d0e1e7cdb1c2fa4d304b) Signed-off-by: Michael Roth --- migration/block-dirty-bitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 8819aabe3a..2c541c985d 100644 --- a/migration/block-dirty-bitmap.c +++ b/migration/block-dirty-bitmap.c @@ -672,6 +672,9 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id) do { ret = dirty_bitmap_load_header(f, &s); + if (ret < 0) { + return ret; + } if (s.flags & DIRTY_BITMAP_MIG_FLAG_START) { ret = dirty_bitmap_load_start(f, &s);