Skip to content

Commit 7f8557b

Browse files
committed
recordmcount: Fix nop_mcount() function
The removal of the longjmp code in recordmcount.c mistakenly made the return of make_nop() being negative an exit of nop_mcount(). It should not exit the routine, but instead just not process that part of the code. By exiting with an error code, it would cause the update of recordmcount to fail some files which would fail the build if ftrace function tracing was enabled. Link: http://lkml.kernel.org/r/[email protected] Reported-by: Uwe Kleine-König <[email protected]> Tested-by: Uwe Kleine-König <[email protected]> Fixes: 3f1df12 ("recordmcount: Rewrite error/success handling") Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent bf8e602 commit 7f8557b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

scripts/recordmcount.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,8 @@ static int nop_mcount(Elf_Shdr const *const relhdr,
389389
mcountsym = get_mcountsym(sym0, relp, str0);
390390

391391
if (mcountsym == Elf_r_sym(relp) && !is_fake_mcount(relp)) {
392-
if (make_nop) {
392+
if (make_nop)
393393
ret = make_nop((void *)ehdr, _w(shdr->sh_offset) + _w(relp->r_offset));
394-
if (ret < 0)
395-
return -1;
396-
}
397394
if (warn_on_notrace_sect && !once) {
398395
printf("Section %s has mcount callers being ignored\n",
399396
txtname);

0 commit comments

Comments
 (0)