Em Thu, 5 May 2022 23:35:29 +0200
Andi Shyti escreveu:
> Hi Mauro,
>
> [...]
>
> > +static int ref_module_dependency(struct module *mod, struct module *this)
> > +{
> > + int ret;
> > +
> > + if (!this || !this->name)
> > + return -EINVAL;
> > +
> > + if (mod == this)
> > +
Hi Mauro,
[...]
> +static int ref_module_dependency(struct module *mod, struct module *this)
> +{
> + int ret;
> +
> + if (!this || !this->name)
> + return -EINVAL;
> +
> + if (mod == this)
> + return 0;
> +
> + mutex_lock(_mutex);
> +
> + ret =
Le 30/04/2022 à 22:04, Mauro Carvalho Chehab a écrit :
> Sometimes, device drivers are bound into each other via try_module_get(),
> making such references invisible when looking at /proc/modules or lsmod.
>
> Add a function to allow setting up module references for such
> cases, and call it
Sometimes, device drivers are bound into each other via try_module_get(),
making such references invisible when looking at /proc/modules or lsmod.
Add a function to allow setting up module references for such
cases, and call it when try_module_get() is used.
Reviewed-by: Dan Williams