On Mon, 1 Jun 2020, Steven Rostedt wrote:
On Mon, 1 Jun 2020 19:45:51 +0100 Jules Irenge <[email protected]> wrote:Sparse reports warnings warning: context imbalance in ftrace_arch_code_modify_prepare() - wrong count at exit warning: context imbalance in ftrace_arch_code_modify_post_process() - wrong count at exit The root cause is that even if the annotations on the function are correct, mutex do not support annotation This makes Sparse to complain. To fix this, __acquire(&text_mutex) and __release(&text_mutex) annotations are added inside ftrace_arch_code_modify_prepare() and ftrace_arch_code_modify_post_process() respectively.Wait what? This looks like either a bug in sparse, or we just remove the annotations. This just makes the code ugly, and looks silly. Nack! -- Steve
Thanks for the feedback, I take good note. Jules

