✓ CI.checkpatch: success for dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling() (rev2)

Patchwork patchwork at emeril.freedesktop.org
Thu Sep 19 09:17:06 UTC 2024


== Series Details ==

Series: dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling() (rev2)
URL   : https://patchwork.freedesktop.org/series/117113/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
c62d7e164862503a3662a095da1c6c9014248cb2
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit e79819345d5d38fe03a00bb1a69c012c2c842028
Author: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Date:   Fri Apr 28 14:52:32 2023 +0200

    dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling()
    
    Condsider the following call sequence:
    
    /* Upper layer */
    dma_fence_begin_signalling();
    lock(tainted_shared_lock);
    /* Driver callback */
    dma_fence_begin_signalling();
    ...
    
    The driver might here use a utility that is annotated as intended for the
    dma-fence signalling critical path. Now if the upper layer isn't correctly
    annotated yet for whatever reason, resulting in
    
    /* Upper layer */
    lock(tainted_shared_lock);
    /* Driver callback */
    dma_fence_begin_signalling();
    
    We will receive a false lockdep locking order violation notification from
    dma_fence_begin_signalling(). However entering a dma-fence signalling
    critical section itself doesn't block and could not cause a deadlock.
    
    So use a successful read_trylock() annotation instead for
    dma_fence_begin_signalling(). That will make sure that the locking order
    is correctly registered in the first case, and doesn't register any
    locking order in the second case.
    
    The alternative is of course to make sure that the "Upper layer" is always
    correctly annotated. But experience shows that's not easily achievable
    in all cases.
    
    Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
    Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
+ /mt/dim checkpatch 2a472f4478e3d55068ea419e79f691f3fa890d4b drm-intel
e79819345d5d dma-buf/dma-fence: Use a successful read_trylock() annotation for dma_fence_begin_signalling()




More information about the Intel-xe mailing list