Skip to content

Commit 4b693d3

Browse files
committed
powerpc64/modules: correctly iterate over stubs in setup_ftrace_ool_stubs
JIRA: https://issues.redhat.com/browse/RHEL-113085 commit f6b4df3 Author: Joe Lawrence <joe.lawrence@redhat.com> Date: Fri Sep 12 10:27:39 2025 -0400 powerpc64/modules: correctly iterate over stubs in setup_ftrace_ool_stubs CONFIG_PPC_FTRACE_OUT_OF_LINE introduced setup_ftrace_ool_stubs() to extend the ppc64le module .stubs section with an array of ftrace_ool_stub structures for each patchable function. Fix its ppc64_stub_entry stub reservation loop to properly write across all of the num_stubs used and not just the first entry. Fixes: eec3796 ("powerpc64/ftrace: Move ftrace sequence out of line") Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> Acked-by: Naveen N Rao (AMD) <naveen@kernel.org> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250912142740.3581368-3-joe.lawrence@redhat.com Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
1 parent 196717f commit 4b693d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/module_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ static int setup_ftrace_ool_stubs(const Elf64_Shdr *sechdrs, unsigned long addr,
11191119

11201120
/* reserve stubs */
11211121
for (i = 0; i < num_stubs; i++)
1122-
if (patch_u32((void *)&stub->funcdata, PPC_RAW_NOP()))
1122+
if (patch_u32((void *)&stub[i].funcdata, PPC_RAW_NOP()))
11231123
return -1;
11241124
#endif
11251125

0 commit comments

Comments
 (0)