ia64/xen-unstable

changeset 10174:0f162a135140

Ensure trace-buffer size is set back to zero if trace buffers can't be allocated.
Signed-off-by: Atsushi Sakai <sakaia@jp.fujitsu.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu May 25 14:37:55 2006 +0100 (2006-05-25)
parents c9c40f6baba0
children 1a18ca9a4a0b
files xen/common/trace.c
line diff
     1.1 --- a/xen/common/trace.c	Thu May 25 14:29:21 2006 +0100
     1.2 +++ b/xen/common/trace.c	Thu May 25 14:37:55 2006 +0100
     1.3 @@ -91,6 +91,7 @@ static int alloc_trace_bufs(void)
     1.4      if ( (rawbuf = alloc_xenheap_pages(order)) == NULL )
     1.5      {
     1.6          printk("Xen trace buffers: memory allocation failed\n");
     1.7 +        opt_tbuf_size = 0;
     1.8          return -EINVAL;
     1.9      }
    1.10  
    1.11 @@ -135,10 +136,7 @@ static int tb_set_size(int size)
    1.12  
    1.13      opt_tbuf_size = size;
    1.14      if ( alloc_trace_bufs() != 0 )
    1.15 -    {
    1.16 -        opt_tbuf_size = 0;
    1.17          return -EINVAL;
    1.18 -    }
    1.19  
    1.20      printk("Xen trace buffers: initialized\n");
    1.21      return 0;