From patchwork Thu May 20 06:14:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduard - Gabriel Munteanu X-Patchwork-Id: 53039 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3E7D4B7D2E for ; Thu, 20 May 2010 16:19:16 +1000 (EST) Received: from localhost ([127.0.0.1]:36049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEz68-0007tl-3v for incoming@patchwork.ozlabs.org; Thu, 20 May 2010 02:19:12 -0400 Received: from [140.186.70.92] (port=58537 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEz1k-0006Tq-1I for qemu-devel@nongnu.org; Thu, 20 May 2010 02:14:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEz1i-0000D6-0S for qemu-devel@nongnu.org; Thu, 20 May 2010 02:14:39 -0400 Received: from fg-out-1718.google.com ([72.14.220.154]:34074) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEz1h-0000D1-Rz for qemu-devel@nongnu.org; Thu, 20 May 2010 02:14:37 -0400 Received: by fg-out-1718.google.com with SMTP id 16so2416625fgg.10 for ; Wed, 19 May 2010 23:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=do2C9FN3ROnvhD59gBuZectV2psHNL48Pk4GbmWbHS0=; b=Fsso5dG1q1u19IQBH8W42oJFs3g7YK/mQHKgiRKTGzpkiY7mj1wxAeQ2yBYWFITQxT 24qXVpVHPTc5eCRNn8JdF4qCFQc7eW4i8DJlTvYw1cqGh63yjQTOCnD5qMb2j8rpDhkb /lRA9JCaHV0OatLy6RREU7WKlCVLZs7WZa9uM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=PdyHXYbnsi0e1WDAE4DoRLAr9KmOF9RTKOsZTXlLNe0l2guFXMvxTtJOcdolzmNLks E2jxq7yxm7I/QwByOLvYUyv9Rt2pR7sS5Ly7RB/KpFdQ9isHvr/KMeUjIZi2xQBheh1I oKoeqO+Y57v2w3yn3zqJKdDFF9hdmC4qXQnpA= Received: by 10.204.15.1 with SMTP id i1mr4792bka.207.1274336076505; Wed, 19 May 2010 23:14:36 -0700 (PDT) Received: from localhost.localdomain ([188.25.93.183]) by mx.google.com with ESMTPS id s17sm27504416bkd.16.2010.05.19.23.14.35 (version=SSLv3 cipher=RC4-MD5); Wed, 19 May 2010 23:14:36 -0700 (PDT) From: Eduard - Gabriel Munteanu To: blauwirbel@gmail.com Date: Thu, 20 May 2010 09:14:04 +0300 Message-Id: <1274336044-28624-1-git-send-email-eduard.munteanu@linux360.ro> X-Mailer: git-send-email 1.6.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: kvm@vger.kernel.org, joro@8bytes.org, qemu-devel@nongnu.org, yamahata@valinux.co.jp, kraxel@redhat.com, Eduard - Gabriel Munteanu Subject: [Qemu-devel] [PATCH] pc: fix segfault introduced by 3d53f5c36ff6 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 3d53f5c36ff6 introduced a segfault by erroneously making fw_cfg a 'void **' and passing it around in different ways. Signed-off-by: Eduard - Gabriel Munteanu Acked-by: Isaku Yamahata --- hw/pc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index fee08c9..4a4a706 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -822,7 +822,7 @@ void pc_memory_init(ram_addr_t ram_size, ram_addr_t ram_addr, bios_offset, option_rom_offset; ram_addr_t below_4g_mem_size, above_4g_mem_size = 0; int bios_size, isa_bios_size; - void **fw_cfg; + void *fw_cfg; if (ram_size >= 0xe0000000 ) { above_4g_mem_size = ram_size - 0xe0000000; @@ -905,7 +905,7 @@ void pc_memory_init(ram_addr_t ram_size, rom_set_fw(fw_cfg); if (linux_boot) { - load_linux(*fw_cfg, kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size); + load_linux(fw_cfg, kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size); } for (i = 0; i < nb_option_roms; i++) {