lkml.org 
[lkml]   [2020]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] x86/ftrace: Add annotations for ftrace_arch_code_modify_prepare() and ftrace_arch_code_modify_post_process()
On Mon, Jun 01, 2020 at 03:46:47PM -0400, Steven Rostedt wrote:
> On Mon, 1 Jun 2020 19:45:51 +0100
> Jules Irenge <jbi.octave@gmail.com> 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

Yes.

> 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.

The annotations added by commit
074376ac0e1d ("ftrace/x86: Anotate text_mutex split between ...
are indeed wrong (because they don't match what the functions are
really doing / mutex operations have never been annotated).
The're also pointless since their prototypes are un-annotated.

-- Luc

\
 
 \ /
  Last update: 2020-06-03 01:11    [W:0.072 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site