From patchwork Fri Apr 19 13:56:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 10908879 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 7F35B922 for ; Fri, 19 Apr 2019 14:06:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F9CD28CF9 for ; Fri, 19 Apr 2019 14:06:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 637C328CFD; Fri, 19 Apr 2019 14:06:00 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 01D6428CFA for ; Fri, 19 Apr 2019 14:05:59 +0000 (UTC) Received: from localhost ([127.0.0.1]:57004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHU9O-0005Nz-Rb for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Apr 2019 10:05:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHU7i-0003ld-28 for qemu-devel@nongnu.org; Fri, 19 Apr 2019 10:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHU00-000731-F8 for qemu-devel@nongnu.org; Fri, 19 Apr 2019 09:56:17 -0400 Received: from mout.web.de ([212.227.17.11]:44585) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHU00-0006wy-4H for qemu-devel@nongnu.org; Fri, 19 Apr 2019 09:56:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1555682167; bh=NIpxH5ThknGkRJ6F3e+5pSUuOOjFOm5bswAT736K03Q=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject; b=JuJrQ2spKtpUHadHgS4F37Mm+bZL+gPtTZ05OAYP8A7Xn17GOwGR6vO9HEmIhgkS/ NsGy0Bq2YbC7GBKiJ6N89qdPCTC0q4NaP8oryRx/7Ck8roKNEk9FD1BkUHgLvmG2f2 MMgaMK6qosfgmK5UsKw3tfxtBwg2S2ZLecBI0kXA= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([46.91.89.140]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MBCJd-1h9Xtr484j-00AICR; Fri, 19 Apr 2019 15:56:07 +0200 Date: Fri, 19 Apr 2019 15:56:05 +0200 From: Lukas Straub To: qemu-devel@nongnu.org Message-ID: <20190419155605.5349857a@luklap> MIME-Version: 1.0 X-Provags-ID: V03:K1:FOWPNRZw+hzvt8A4AnU8Db9Td57bXoINzU+y5mLnHDU9T6ZBfiY dJtA9z657cV6W+jYFvYKduMQBoconikLUH/bVnPc3wfE7LUlg+50ikGFapL7lb9T7yB9bRh fGWxMSo+cdu9RetZihPtLhxXaieqBfkbDHyzAHJ1MZtjgnei9tC4KyHvFMzpX2Rodk8h+4d E6Q4LsR6btxtEkUNanKgw== X-UI-Out-Filterresults: notjunk:1;V03:K0:jU1pFBqBRgs=:dllQByPVPhasFHdTQjgFLl 8Voxt7YrH5udTebVg8RELT3v5Fex/nCH+EpWR/jtVUIY6JDdA0woxJNM4zCEvhXc/buMQUFeh 2opLzEMb+m9D2/lM+7ZiIQrFqhcqcweg6/aVH8QPa1mg2XCPedz3eZYmeYkCaPQluNCt5Qzrc evUEacx8HwTBlUMxGZPqRE97fGJuvd96LR0pr1ZhOcbMBKdjq7RwmPKO0gcL0vO5/hteKT5Zk Hl5ejTyHWEV3VgBr7P/y91GaMAfG9axNpX1BpuBSVt+P5OznMfrGkkIiqCBxqSYV3I0wKr0Qk +5ADrMMpS3QpWo3k503AYwEoQBXryIclfmOHsaoVEWGotvxNTPTVlkxhnX1Hry+fDskJMDJUg Gd3odrQ1Jw3vPS+pDdqw/acBmGbKdu98necPK+UW5L6BlqXgcFRNBEpqOn7CqtiOyqgpAu9q5 XKL162zDn93R3vQp1zAu3siiI8baTGmaCt5s45BvOpPTNz9Kcw1Wd/I93br7CrtQEVxIp4c+4 iopXmr0BMjq4S/PozWy0b3tqgNVSFYqzX+B+OzlQcp+CAjhVwlvFFi4lcN+Dygm/PO1UEzoAS sLtQRctbk7Bi61V3MAbp6WMAr4Z9yp42NHWQAE51AWS2WbacyorMVwBK+wsst/7YwesvcIp7i kg1uNZaz05LCR59uYaBdh7afCZhPVl2e7oj+A1psr5I+H2yjYmCXWiNMNwI+fvIJDr+ghMDDV ZB7oQWo+HgQhioUjHpkUT0hxs1Bw01Vg7zgA6vxrDigDEKCjs5DCJ9h+DsutCWLXHQQgzJtuF k1CBt3JnlNd8uPxWhFU/jKufSYH2TSTOnXO9K3OuE0XX1KH4lkWsVNPatFwaKkLdehPiM06o8 K1c8igHHMmT1059PrRAlmDF//6NSsPri2qp2RUd+bk8CTxaO4M7wyg0pNyxwjDSLvdHOh2yp4 Ak1JJrY7KZA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.11 Subject: [Qemu-devel] [PATCH] net/colo-compare.c: Fix a crash in COLO Primary. 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: "Zhang, Chen" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Lukas Straub Fixes the following bug: https://bugs.launchpad.net/qemu/+bug/1824622 Signed-off-by: Lukas Straub --- net/colo-compare.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.20.1 diff --git a/net/colo-compare.c b/net/colo-compare.c index bf10526f05..fcb491121b 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -813,9 +813,8 @@ static void colo_compare_handle_event(void *opaque) break; } - assert(event_unhandled_count > 0); - qemu_mutex_lock(&event_mtx); + assert(event_unhandled_count > 0); event_unhandled_count--; qemu_cond_broadcast(&event_complete_cond); qemu_mutex_unlock(&event_mtx);