From: Tetsuo Handa Date: Wed, 22 Jun 2022 05:46:31 +0000 (+0900) Subject: lib/smp_processor_id: fix imbalanced instrumentation_end() call X-Git-Tag: baikal/mips/sdk5.9~170 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=5e8d42513762c21d6178f4d51099ef37e882dff1;p=kernel.git lib/smp_processor_id: fix imbalanced instrumentation_end() call [ Upstream commit bd766e960600bbf9acd95175eb698b932ed39f93 ] Currently instrumentation_end() won't be called if printk_ratelimit() returned false. Link: https://lkml.kernel.org/r/a636d8e0-ad32-5888-acac-671f7f553bb3@I-love.SAKURA.ne.jp Fixes: 0b4ac6e9acb39890 ("lib/smp_processor_id: Move it into noinstr section") Signed-off-by: Tetsuo Handa Cc: Thomas Gleixner Cc: Alexandre Chartre Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 046ac6297c781..a2bb7738c373c 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c @@ -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;