On Sat, 20 May 2023 23:58:01 +0530 Naveen N Rao <nav...@kernel.org> wrote:
> > > > At the begining of ftrace_replace_code(), don't you miss: > > > > if (unlikely(ftrace_disabled)) > > return; > > ftrace_disabled is a static, so it can't be tested here. FWIW, x86 also > implements ftrace_replace_code(), and doesn't test ftrace_disabled. > > Looking at the call path, it looks like it gets tested much before, so > may not be necessary. It sure would be good to get Steven's view on > this. Yes, ftrace_disabled should not be used in arch code. It should be caught before then. Thanks, -- Steve