Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] dma_fence: commit message incorrectly claims change is in 
FenceContext::drop()
--

commit 4a645fda82950d47b5bed116917aa2253db17d1f
Author: Philipp Stanner <[email protected]>

rust: DmaFence: Add better warning through Device reference

This commit replaces a pr_err warning about forgotten fences with a more
informative dev_warn. It also adds a Device reference to FenceContext to
support the dev_warn output.

> FenceContext::drop() contains a warning print that warns about possible
> memory corruptions if there are forgotten fences. However, precisely
> speaking, a forgotten fence is undefined behavior.

[Severity: Medium]
Is this commit message accurate? The text states the warning print being
replaced is located in FenceContext::drop(), but the diff shows the
modification actually takes place in the Drop implementation for DriverFence:

rust/kernel/dma_buf/dma_fence.rs:drop() {
    ...
    let signaled: bool = unsafe { 
bindings::dma_fence_test_signaled_flag(guard.as_raw()) };
    if !signaled {
        // SAFETY: data is valid because self is valid.
        let dev = unsafe { self.data.as_ref().fctx.dev };
        dev_warn!(dev, "DriverFence drops unsignaled.\n");
    ...
}

FenceContext::drop() does not contain this warning print. Could the commit
message be updated to correctly state that the warning is in DriverFence?

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

Reply via email to