Re: [PATCH 3/4] ftrace: No return value for ftrace_process_locs

From: Steven Rostedt
Date: Wed Apr 25 2012 - 07:29:44 EST


On Wed, 2012-04-25 at 10:23 +0200, Jiri Olsa wrote:
> The return value of ftrace_process_locs is never checked. The function
> tries to update as many calls as possible and in case of error there's
> either warning output or ftrace_bug call.

No, the real bug is...

> #ifdef CONFIG_MODULES
> @@ -3789,9 +3784,9 @@ void __init ftrace_init(void)
>
> last_ftrace_enabled = ftrace_enabled = 1;
>
> - ret = ftrace_process_locs(NULL,
> - __start_mcount_loc,
> - __stop_mcount_loc);
> + ftrace_process_locs(NULL,
> + __start_mcount_loc,
> + __stop_mcount_loc);

We should check the return code of ftrace_process_locs().

-- Steve

>
> ret = register_module_notifier(&ftrace_module_nb);
> if (ret)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/