[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for v1.6] pc: Fix initialization of the ram_memory variable.



Il 29/08/2013 11:00, Paolo Bonzini ha scritto:
Il 16/08/2013 16:46, Anthony PERARD ha scritto:
In some cases (Xen), it will not be initialized before to be used. This
leads to segv.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

---

It works with this simple initialization to NULL, but would it be
necessary (or better) to assign a proper value to this variables ?
Yeah, the right value of this variable comes from xen_ram_init (called
by xen_hvm_init).

Paolo

I done a fast search of patch between 1.5 and 1.6 about memory on xen files and I found this patch:

Commit:2c9b15cab12c21e32dffb67c5e18f3dc407ca224
* memory: add owner argument to initialization functions

I not understand if can be this that have introduced an unexpected event with xen and how to solve correctly.

Thanks for any reply and sorry for my bad english.


---
  hw/i386/pc_piix.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6e1e654..596d433 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -86,7 +86,7 @@ static void pc_init1(MemoryRegion *system_memory,
      BusState *idebus[MAX_IDE_BUS];
      ISADevice *rtc_state;
      ISADevice *floppy;
-    MemoryRegion *ram_memory;
+    MemoryRegion *ram_memory = NULL;
      MemoryRegion *pci_memory;
      MemoryRegion *rom_memory;
      DeviceState *icc_bridge;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.