[PATCH 2/2 v5.10] ftrace: Fix possible use-after-free issue in ftrace_location()