Hi Janusz,
> HuC delayed loading fence, introduced with commit 27536e03271da
> ("drm/i915/huc: track delayed HuC load with a fence"), is registered with
> object tracker early on driver probe but unregistered only from driver
> remove, which is not called on early probe errors. Since its memory is
> allocated under devres, then released anyway, it may happen to be
> allocated again to the fence and reused on future driver probes, resulting
> in kernel warnings that taint the kernel:
[...]
> That scenario is most easily reproducible with
> igt@i915_module_load@reload-with-fault-injection.
>
> Fix the issue by moving the cleanup step to driver release path.
>
> Fixes: 27536e03271da ("drm/i915/huc: track delayed HuC load with a fence")
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13592
> Cc: Daniele Ceraolo Spurio <[email protected]>
> Cc: Alan Previn <[email protected]>
> Signed-off-by: Janusz Krzysztofik <[email protected]>
I have tested this on a kernel build with kconfig from one of
the failing runs. Before your patch the reproduction came quite
soon after a few dozen of runs, but I have been testing this now
for a prolonged time and did not see the same failure again.
Reviewed-by: Krzysztof Karas <[email protected]>
Best Regards,
Krzysztof