[PATCH] drm/i915/huc: Fix fence not released on early probe errors
Krzysztof Karas
krzysztof.karas at intel.com
Thu Apr 3 13:16:12 UTC 2025
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 at 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 <daniele.ceraolospurio at intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis at intel.com>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
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 <krzysztof.karas at intel.com>
Best Regards,
Krzysztof
More information about the Intel-gfx
mailing list