Message ID | 1459849818-26649-4-git-send-email-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 112E79F336 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 5 Apr 2016 09:50:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67E6920374 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 5 Apr 2016 09:50:49 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id C41B720373 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 5 Apr 2016 09:50:48 +0000 (UTC) Received: from localhost ([::1]:35624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1anNdG-0003VL-TG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 05 Apr 2016 05:50:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1anNcy-0003V8-HY for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:50:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1anNcx-00017Q-HY for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:50:28 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1anNcx-00016g-7u for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:50:27 -0400 Received: by mail-wm0-x22d.google.com with SMTP id 191so18373805wmq.0 for <qemu-devel@nongnu.org>; Tue, 05 Apr 2016 02:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TZDmtHktHi824Hn6Wvb35LvVCaqHtkLogQYXRv1FPX8=; b=vsYGUi5xH2Hsi6Mf8bL0fopILCgxHK4HwUs6d6cqB3YLYlchmCLo72WY6LJ2p7E1Tb 5SPPQj6R2hfdpTytaZ0SHJRCXdYxz/sifm/Xd4dZUKevvWQQbDXu+1DYqoYy6BMpjcJS SEmX9oiA9ylolzxmlHX4MMB1RlHht/UjerHh/zcB3TZpQaZDGyWmxqmtBzjRyq2szTAU SGXrbEgFlQwH3JqNAxe0u1rwKov1EoYMwDGUM9n9Q4m3HqJh0RsChg9jZjmWj1jYZb7o ptvF8TRcy8ILFdQULZ0dGeeaINSGtdVlYrw7XNQV6Zas310vYkpo2cTNSm9tszA/oWJG ut2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TZDmtHktHi824Hn6Wvb35LvVCaqHtkLogQYXRv1FPX8=; b=k3LjOrivIRynfu4zU/QD6eVUiB9k1kqziZQO+rL3Nzk9Fdg+FK2SWG0Q3+ME1rI5oz QOoZcg2racELe5D4PYhoR4WfgI8EeTNAFH+WlHyb6YiLSIHzsnsb75XboN5E0mF9FNhu X5MIwHfb1kfoigWzxj1I1ivhPtY82h1wpxvJCXhpCUtCKzJHw02cW/GhJ5x0P5Gajmnj KrU5vUf9QzORQq4dtZ4S+YaoVJMGmu5Zu4kZl1ByLYGpPssuypILde5R4dFhTtizqsV4 dacAoLXqQeDeZI9CuCIYnYkV3lwHqajT/VRv0IgVZ+vpwQ/Us8fzKRd6wtUxs/r+5J9G BRkg== X-Gm-Message-State: AD7BkJKcsVheo97uUcdL+ZEQsNKFfFpnUa9eL9LRp3CXeTWnnXTMcuriJjLFp5RSFtyQJQ== X-Received: by 10.194.236.198 with SMTP id uw6mr12069303wjc.42.1459849826528; Tue, 05 Apr 2016 02:50:26 -0700 (PDT) Received: from donizetti.lan (94-39-141-76.adsl-ull.clienti.tiscali.it. [94.39.141.76]) by smtp.gmail.com with ESMTPSA id ka4sm33721377wjc.47.2016.04.05.02.50.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2016 02:50:25 -0700 (PDT) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Tue, 5 Apr 2016 11:50:06 +0200 Message-Id: <1459849818-26649-4-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1459849818-26649-1-git-send-email-pbonzini@redhat.com> References: <1459849818-26649-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22d Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 03/15] memory: fix segv on qemu_ram_free(block=0x0) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/exec.c b/exec.c index f46e596..c4f9036 100644 --- a/exec.c +++ b/exec.c @@ -1773,6 +1773,10 @@ static void reclaim_ramblock(RAMBlock *block) void qemu_ram_free(RAMBlock *block) { + if (!block) { + return; + } + qemu_mutex_lock_ramlist(); QLIST_REMOVE_RCU(block, next); ram_list.mru_block = NULL;