Re: [PATCH] rust: DmaFence: Add better warning through Device reference
From: Danilo Krummrich
Date: Fri Sep 25 2026 - 11:57:41 EST
On Fri Sep 25, 2026 at 3:08 PM CEST, Philipp Stanner wrote:
> The driver can avoid dropping half-forgotten stuff by calling
> jobqueue.complete_all_jobs(ECANCELED) immediately before dropping,
> which allows us for having the warning without false-positives.
This would just move it up a layer from inventing a new type around DriverFence
to invent a new type around Jobqueue which does that instead.
But the Jobqueue won't have any procedural teardown, it has to teardown stuff in
drop() anyway, which includes dropping jobs already.
What I'm saying is that there's not much value in DriverFence::drop() having
this warning in the first place, which then either the driver or the jobqueue
has to work around on teardown.