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-changelog

[Xen-changelog] Ensure trace-buffer size is set back to zero if trace bu

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Ensure trace-buffer size is set back to zero if trace buffers can't be allocated.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 May 2006 17:44:11 +0000
Delivery-date: Thu, 25 May 2006 10:45:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Ensure trace-buffer size is set back to zero if trace buffers can't be allocated., Xen patchbot-unstable <=