[Crash-utility] [PATCH] s390: Add restart stack support (version 2)

Dave Anderson anderson at redhat.com
Mon Aug 15 17:28:50 UTC 2011



----- Original Message -----
> Hi Dave,
> 
> Sorry, the restart stack patch is missing a check if the restart_stack
> symbols exists. Without this check, we get error messages for older
> kernels. Here the updated patch.
> 
> Sorry for the noise.
> 
> Signed-off-by: Michael Holzheu <holzheu at linux.vnet.ibm.com>

OK -- I had checked it out only a live system, but that code
path wouldn't be exercised in that case, so I'll add in the 
symbol_exists() check to s390x_back_trace_cmd().

Also, the "if (!stack_addr)" check in get_int_stack() is an 
impossibility, right?

Thanks,
  Dave


> ---
> s390x.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
> 
> --- a/s390x.c
> +++ b/s390x.c
> @@ -825,9 +825,16 @@ static void get_int_stack(char *stack_na
> unsigned long stack_addr;
> 
> *start = *end = 0;
> - if (!MEMBER_EXISTS("_lowcore", stack_name))
> - return;
> - stack_addr = ULONG(lc + MEMBER_OFFSET("_lowcore", stack_name));
> + if (strcmp(stack_name, "restart_stack") == 0) {
> + stack_addr = symbol_value("restart_stack");
> + if (!stack_addr)
> + return;
> + stack_addr = readmem_ul(stack_addr);
> + } else {
> + if (!MEMBER_EXISTS("_lowcore", stack_name))
> + return;
> + stack_addr = ULONG(lc + MEMBER_OFFSET("_lowcore", stack_name));
> + }
> if (stack_addr == 0)
> return;
> *start = stack_addr - INT_STACK_SIZE;
> @@ -993,6 +1000,10 @@ static void s390x_back_trace_cmd(struct
> }
> s390x_print_lowcore(lowcore,bt,1);
> fprintf(fp,"\n");
> + if (symbol_exists("restart_stack")) {
> + get_int_stack("restart_stack", lowcore, &low, &high);
> + sp = show_trace(bt, cnt, sp, low, high);
> + }
> get_int_stack("panic_stack", lowcore, &low, &high);
> sp = show_trace(bt, cnt, sp, low, high);
> get_int_stack("async_stack", lowcore, &low, &high);




More information about the Crash-utility mailing list