Re: [PATCH v6 09/13] module: Move kallsyms support into a separate file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Feb 2022, Aaron Tomlin wrote:

> On Mon 2022-02-21 09:35 +0100, Christophe Leroy wrote:
> > Fixup:
> >
> > diff --git a/kernel/module/kallsyms.c b/kernel/module/kallsyms.c
> > index 6c8f1f390cf5..2ee8d2e67068 100644
> > --- a/kernel/module/kallsyms.c
> > +++ b/kernel/module/kallsyms.c
> > @@ -171,8 +171,7 @@ void add_kallsyms(struct module *mod, const struct
> > load_info *info)
> >      Elf_Shdr *symsec = &info->sechdrs[info->index.sym];
> >
> >      /* Set up to point into init section. */
> > -    mod->kallsyms = (struct mod_kallsyms __rcu *)mod->init_layout.base +
> > -        info->mod_kallsyms_init_off;
> > +    mod->kallsyms = (void __rcu *)mod->init_layout.base +
> > info->mod_kallsyms_init_off;
> >
> >      /* The following is safe since this pointer cannot change */
> >      rcu_dereference_sched(mod->kallsyms)->symtab = (void *)symsec->sh_addr;
> 
> Agreed.

Could you split all of this to a follow-up patch, please? So that 9/13 is 
really only about moving the code.

Btw, the sparse warnings "dereference of noderef expression" appeared 
after 5/13 of the series which moved latched RB-tree support, so it does 
not belong here anyway.

Miroslav



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux