[igt-dev] [PATCH i-g-t 1/2] lib/igt_kmod: Wait for a kmod to finish its probe before unloding it.

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Apr 1 02:21:45 UTC 2022


On Thu, 31 Mar 2022 19:11:23 -0700, Ceraolo Spurio, Daniele wrote:
>
> On 3/31/2022 7:03 PM, Dixit, Ashutosh wrote:
> > On Wed, 30 Mar 2022 11:32:58 -0700, Daniele Ceraolo Spurio wrote:
> >> diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
> >> index cf7a3b22..d2ac8a56 100644
> >> --- a/lib/igt_kmod.c
> >> +++ b/lib/igt_kmod.c
> >> @@ -143,6 +143,12 @@ out:
> >>	return ret;
> >>   }
> >>
> >> +static bool
> >> +igt_kmod_is_loading(struct kmod_module *kmod)
> >> +{
> >> +	return kmod_module_get_initstate(kmod) == KMOD_MODULE_COMING;
> > One idea would be to check for KMOD_MODULE_LIVE here which will basically
> > invert the logic in the loop but will be a more exact check? But anyway
> > it's equivalent so no need to change I guess.
>
> I was undecided myself, but decided to go with "COMING" because that
> matches the exact case I was looking for (i.e. init in progress). I can
> flip it to check for KMOD_MODULE_LIVE  if you think that works better
> and/or is more generic.

Leave as is. Or you decide, either is ok with me. Thanks.


More information about the igt-dev mailing list