[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5660e4c7-b316-450e-9413-18e2568a0a35@linux.ibm.com>
Date: Thu, 17 Apr 2025 11:27:25 +0530
From: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Hari Bathini <hbathini@...ux.ibm.com>
Subject: Re: [mainline]Kernel crash while running ftrace selftest
On 17/04/25 12:50 am, Steven Rostedt wrote:
> On Wed, 16 Apr 2025 22:36:11 +0530
> Venkat Rao Bagalkote <venkat88@...ux.ibm.com> wrote:
>
>>> */
>>> int ftrace_shutdown_subops(struct ftrace_ops *ops, struct ftrace_ops *subops, int command)
>>> {
>>> - struct ftrace_hash *filter_hash;
>>> - struct ftrace_hash *notrace_hash;
>>> + struct ftrace_hash *filter_hash = EMPTY_HASH;
>>> + struct ftrace_hash *notrace_hash = EMPTY_HASH;
>>> int ret;
>>>
>>> if (unlikely(ftrace_disabled))
>>
>> Hello Steve,
>>
>> Issue still persists with the above patch.
> Ah I just noticed that your backtrace had ftrace_startup_subops() not
> ftrace_shutdown_subops(). How about this patch? It initializes for both
> functions:
>
> -- Steve
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index a8a02868b435..43394445390c 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -3490,8 +3490,8 @@ static int add_next_hash(struct ftrace_hash **filter_hash, struct ftrace_hash **
> */
> int ftrace_startup_subops(struct ftrace_ops *ops, struct ftrace_ops *subops, int command)
> {
> - struct ftrace_hash *filter_hash;
> - struct ftrace_hash *notrace_hash;
> + struct ftrace_hash *filter_hash = EMPTY_HASH;
> + struct ftrace_hash *notrace_hash = EMPTY_HASH;
> struct ftrace_hash *save_filter_hash;
> struct ftrace_hash *save_notrace_hash;
> int ret;
> @@ -3625,8 +3625,8 @@ static int rebuild_hashes(struct ftrace_hash **filter_hash, struct ftrace_hash *
> */
> int ftrace_shutdown_subops(struct ftrace_ops *ops, struct ftrace_ops *subops, int command)
> {
> - struct ftrace_hash *filter_hash;
> - struct ftrace_hash *notrace_hash;
> + struct ftrace_hash *filter_hash = EMPTY_HASH;
> + struct ftrace_hash *notrace_hash = EMPTY_HASH;
> int ret;
>
> if (unlikely(ftrace_disabled))
Above patch fixes the reported issue. Hence,
Tested-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
With Patch:
# ok 40 event filter function - test event filtering on functions
# ok 41 ftrace - function graph filters with stack tracer
# ok 42 ftrace - function graph filters
# ok 43 ftrace - function graph filters
# ok 44 ftrace - function graph filters
# ok 45 ftrace - function profiler with function graph tracing
# ok 46 ftrace - function graph print function return value # SKIP
# ok 47 ftrace - function glob filters
Attached is the config file.
View attachment "config" of type "text/plain" (183911 bytes)
Powered by blists - more mailing lists