[Crash-utility] [PATCH] Support cpu_map/cpu_mask changes in 2.6.29

Dave Anderson anderson at redhat.com
Mon Apr 27 16:01:25 UTC 2009


----- "Dave Anderson" <anderson at redhat.com> wrote:

> +ulong
> +cpu_map_addr(const char *type)
> +{
> +       char cpu_map_symbol[32];
> +
> +       sprintf(cpu_map_symbol, "cpu_%s_map", type);
> +       if (symbol_exists(cpu_map_symbol))
> +               return symbol_value(cpu_map_symbol);
> +       else
> +               return get_cpu_map_addr_from_mask(type);
> +}
> 
> Although, for safety's sake above, the symbol_value() call should
> be replaced with kernel_symbol_value() in order to rule out the
> invalid usage of stray module symbols of the same name.

Sorry, I meant that the symbol_exists() function call above should be
replaced with kernel_symbol_exists()...

Dave




More information about the Crash-utility mailing list