From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEyx2-0007MC-R0 for qemu-devel@nongnu.org; Mon, 11 Mar 2013 05:23:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UEywz-0002ju-M5 for qemu-devel@nongnu.org; Mon, 11 Mar 2013 05:23:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UEywz-0002jo-Eh for qemu-devel@nongnu.org; Mon, 11 Mar 2013 05:23:21 -0400 Date: Mon, 11 Mar 2013 11:23:43 +0200 From: "Michael S. Tsirkin" Message-ID: <20130311092343.GA22815@redhat.com> References: <1362993621-30993-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1362993621-30993-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] pci: handle zero size ROM files gracefully List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , qemu-devel@nongnu.org On Mon, Mar 11, 2013 at 10:20:19AM +0100, Stefan Hajnoczi wrote: > This is a fix for https://bugs.launchpad.net/qemu/+bug/1127053. > > If pxe-e1000.rom has 0 size we allocate the same RAMBlock offset twice and fail > with an assertion in qemu_ram_set_idstr() later on. > > Two fixes: > > 1. Print an error when the ROM file has zero size. Use -device ...,romfile= > instead to disable the ROM. > > 2. Add an assertion to find_ram_offset() so we watch this inconsistency if it > ever happens again. > > Stefan Hajnoczi (2): > pci: refuse empty ROM files > exec: assert that RAMBlock size is non-zero > > exec.c | 2 ++ > hw/pci/pci.c | 7 ++++++- > 2 files changed, 8 insertions(+), 1 deletion(-) Applied, thanks. > -- > 1.8.1.4