Skip to content

Commit

Permalink
lib/smp_processor_id: fix imbalanced instrumentation_end() call
Browse files Browse the repository at this point in the history
Currently instrumentation_end() won't be called if printk_ratelimit()
returned false.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: 126f21f ("lib/smp_processor_id: Move it into noinstr section")
Signed-off-by: Tetsuo Handa <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Alexandre Chartre <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Tetsuo Handa authored and akpm00 committed Jul 18, 2022
1 parent 953257a commit bd27aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/smp_processor_id.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)

printk("caller is %pS\n", __builtin_return_address(0));
dump_stack();
instrumentation_end();

out_enable:
instrumentation_end();
preempt_enable_no_resched_notrace();
out:
return this_cpu;
Expand Down

0 comments on commit bd27aca

Please sign in to comment.