Re: [PATCH v3] kallsyms: Always initialize modbuildid

From: Steven Rostedt
Date: Wed Dec 17 2025 - 17:26:30 EST


On Wed, 10 Dec 2025 18:03:45 +0100
Maurice Hieronymus <mhi@xxxxxxxxxxx> wrote:

> @@ -7761,6 +7761,12 @@ ftrace_mod_address_lookup(unsigned long addr, unsigned long *size,
> if (ret) {
> if (modname)
> *modname = mod_map->mod->name;
> + if (modbuildid)
> +#if IS_ENABLED(CONFIG_STACKTRACE_BUILD_ID)

IS_ENABLED() is for use within C code. This should simply be:

#ifdef CONFIG_STACKTRACE_BUILD_ID

-- Steve

> + *modbuildid = mod_map->mod->build_id;
> +#else
> + *modbuildid = NULL;
> +#endif
> break;
> }
> }