lkml.org 
[lkml]   [2021]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/13] kallsyms: refactor {,module_}kallsyms_on_each_symbol
On Fri, Jan 29, 2021 at 10:43:36AM +0100, Petr Mladek wrote:
> > --- a/kernel/livepatch/core.c
> > +++ b/kernel/livepatch/core.c
> > @@ -164,12 +164,8 @@ static int klp_find_object_symbol(const char *objname, const char *name,
> > .pos = sympos,
> > };
> >
> > - mutex_lock(&module_mutex);
> > - if (objname)
> > + if (objname || !kallsyms_on_each_symbol(klp_find_callback, &args))
> > module_kallsyms_on_each_symbol(klp_find_callback, &args);
> > - else
> > - kallsyms_on_each_symbol(klp_find_callback, &args);
> > - mutex_unlock(&module_mutex);
>
> This change is not needed. (objname == NULL) means that we are
> interested only in symbols in "vmlinux".
>
> module_kallsyms_on_each_symbol(klp_find_callback, &args)
> will always fail when objname == NULL.

I just tried to keep the old behavior. I can respin it with your
recommended change noting the change in behavior, though.

\
 
 \ /
  Last update: 2021-02-01 12:50    [W:0.453 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site