WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] [PATCH] Fix possible random return value from find_space

was this by inspection or was it called with a size of zero?
-JX
On Aug 17, 2006, at 7:03 PM, Jimi Xenidis wrote:

Thanks Amos.. I adapted it a little bit.. good catch.. pushed.
-JX
On Aug 17, 2006, at 6:30 PM, Amos Waterland wrote:

In find_space, if the user passes zero for the size argument she will
get a random value returned.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 boot_of.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r da9637bef06a xen/arch/powerpc/boot_of.c
--- a/xen/arch/powerpc/boot_of.c        Thu Aug 17 17:58:07 2006 -0400
+++ b/xen/arch/powerpc/boot_of.c        Thu Aug 17 18:28:02 2006 -0400
@@ -698,7 +698,7 @@ static ulong find_space(u32 size, u32 al
 {
     memory_map_t *map = (memory_map_t *)((ulong)mbi->mmap_addr);
ulong eomem = ((u64)map->length_high << 32) | (u64)map- >length_low;
-    ulong base;
+    ulong base = 0x0;

     if (size == 0) return base;


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>