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

[Xen-changelog] Ensure trace-buffer size is set back to zero if trace buffers can't be allocated.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0f162a1351404f84002de6fa17b9bb49514caca0
# Parent  c9c40f6baba00f8fbc3fe6bb3338fb975e31849c
Ensure trace-buffer size is set back to zero if trace buffers can't be 
allocated.
Signed-off-by: Atsushi Sakai <sakaia@xxxxxxxxxxxxxx>
---
 xen/common/trace.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -r c9c40f6baba0 -r 0f162a135140 xen/common/trace.c
--- a/xen/common/trace.c        Thu May 25 14:29:21 2006 +0100
+++ b/xen/common/trace.c        Thu May 25 14:37:55 2006 +0100
@@ -91,6 +91,7 @@ static int alloc_trace_bufs(void)
     if ( (rawbuf = alloc_xenheap_pages(order)) == NULL )
     {
         printk("Xen trace buffers: memory allocation failed\n");
+        opt_tbuf_size = 0;
         return -EINVAL;
     }
 
@@ -135,10 +136,7 @@ static int tb_set_size(int size)
 
     opt_tbuf_size = size;
     if ( alloc_trace_bufs() != 0 )
-    {
-        opt_tbuf_size = 0;
-        return -EINVAL;
-    }
+        return -EINVAL;
 
     printk("Xen trace buffers: initialized\n");
     return 0;

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


 


Rackspace

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