Commit 8e5f378
drm/i915/huc: fix leak of debug object in huc load fence on driver unload
The fence is always initialized in huc_init_early, but the cleanup in
huc_fini is only being run if HuC is enabled. This causes a leaking of
the debug object when HuC is disabled/not supported, which can in turn
trigger a warning if we try to register a new debug offset at the same
address on driver reload.
To fix the issue, make sure to always run the cleanup code.
Reported-by: Tvrtko Ursulin <[email protected]>
Reported-by: Brian Norris <[email protected]>
Fixes: 27536e0 ("drm/i915/huc: track delayed HuC load with a fence")
Signed-off-by: Daniele Ceraolo Spurio <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Alan Previn <[email protected]>
Cc: John Harrison <[email protected]>
Tested-by: Brian Norris <[email protected]>
Reviewed-by: John Harrison <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 0222469)
Signed-off-by: Rodrigo Vivi <[email protected]>1 parent 264bc5d commit 8e5f378
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
335 | 336 | | |
336 | | - | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| |||
0 commit comments