From: Steven Rostedt <rostedt@goodmis.org>
To: "Jérémy Jean" <Jeremy.Jean@oss.cyber.gouv.fr>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, mgorman@suse.de, include@grrlz.net,
bsegall@google.com, dietmar.eggemann@arm.com, kees@kernel.org,
kprateek.nayak@amd.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, vschneid@redhat.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] fork: initialize function graph state before copy_exec_state()
Date: Sat, 22 Aug 2026 11:22:48 -0400 [thread overview]
Message-ID: <20260822112248.1b7e1b1d@fedora> (raw)
In-Reply-To: <20260822084927.547141-2-Jeremy.Jean@oss.cyber.gouv.fr>
On Sat, 22 Aug 2026 08:49:27 +0000
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr> wrote:
> dup_task_struct() copies the parent's task_struct, including ret_stack.
> ftrace_graph_init_task() clears the copied function graph state, but it
> currently runs after copy_exec_state().
>
> For non-CLONE_VM forks, copy_exec_state() allocates a new task_exec_state.
> If that allocation fails, copy_process() reaches bad_fork_free and
> free_task() calls ftrace_graph_exit_task(). Since the child still carries
> the parent's ret_stack pointer, the unwind frees the parent's active
> function graph return stack. The parent subsequently accesses freed memory
> from function_graph_enter_regs().
>
As this effects function_graph tracing, please resend and Cc:
linux-trace-kernel@vger.kernel.org so that it gets to the proper
patchwork. It will need to go through my tree so that it gets the
proper testing.
Thanks,
-- Steve
next prev parent reply other threads:[~2026-08-22 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 8:49 [PATCH v2] fork: initialize function graph state before copy_exec_state() Jérémy Jean
2026-08-22 9:37 ` Bradley Morgan
2026-08-22 11:28 ` Bradley Morgan
2026-08-22 15:22 ` Steven Rostedt [this message]
2026-08-22 19:56 ` Jérémy Jean
-- strict thread matches above, loose matches on Subject: below --
2026-08-22 19:53 Jérémy Jean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260822112248.1b7e1b1d@fedora \
--to=rostedt@goodmis.org \
--cc=Jeremy.Jean@oss.cyber.gouv.fr \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=include@grrlz.net \
--cc=juri.lelli@redhat.com \
--cc=kees@kernel.org \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.