All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Philipp Stanner" <phasta@kernel.org>
Cc: dri-devel@lists.freedesktop.org, media-ci@linuxtv.org,
	ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH] rust: DamFence: Remove warning about unsignaled drop
Date: Thu, 12 Nov 2026 10:20:29 +0000	[thread overview]
Message-ID: <sashiko-outbox-210930@kernel.org> (raw)
In-Reply-To: <20261112101015.528127-2-phasta@kernel.org>

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 <phasta@kernel.org>

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/20261112101015.528127-2-phasta@kernel.org?part=1

  reply	other threads:[~2026-11-12 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 10:10 [PATCH] rust: DamFence: Remove warning about unsignaled drop Philipp Stanner
2026-11-12 10:20 ` sashiko-bot [this message]
2026-11-12 10:29 ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-210930@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=media-ci@linuxtv.org \
    --cc=ojeda@kernel.org \
    --cc=phasta@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.