Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] rust: dma_fence: stale DriverFence rustdoc after warning removal
  in drop()
--

commit 1fa69b16f405cf6ecb2511fccf990063ada22d3a
Author: Philipp Stanner <[email protected]>

rust: DamFence: Remove warning about unsignaled drop

This commit removes the error message printed when a DriverFence is dropped
before being signaled.

> diff --git a/rust/kernel/dma_buf/dma_fence.rs 
> b/rust/kernel/dma_buf/dma_fence.rs
> index 18a43e1bb442f..a46b6a1f114f1 100644
> --- a/rust/kernel/dma_buf/dma_fence.rs
> +++ b/rust/kernel/dma_buf/dma_fence.rs
> @@ -934,7 +934,6 @@ fn drop(&mut self) {
>          // SAFETY: `guard` is valid until the `call_rcu()` below.
>          let signaled: bool = unsafe { 
> bindings::dma_fence_test_signaled_flag(guard.as_raw()) };
>          if !signaled {
> -            pr_err!("DriverFence drops unsignaled. Danger of memory 
> corruption!\n");
>              // SAFETY: `guard` is valid until the `call_rcu()` below. The 
> fence
>              // must not have been signaled yet, which we check directly 
> above.
>              unsafe { bindings::dma_fence_set_error(guard.as_raw(), 
> ECANCELED.to_errno()) };

[Severity: Low]
Should the rustdoc comment on struct DriverFence also be updated now that
dropping an unsignaled fence is canonical teardown and no longer logs a
message?

rust/kernel/dma_buf/dma_fence.rs:
    /// As a last resort, a [`DriverFence`] will signal itself if it drops
    /// unsignaled and print a warning.
    pub struct DriverFence<'a, T: FenceContextOps> {

Also, the commit subject misspells the component as DamFence, and the
commit message refers to the removed pr_err!() call as pr_warn!().

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to