✓ CI.checkpatch: success for drm/xe/userptr: properly setup pfn_flags_mask (rev2)

Patchwork patchwork at emeril.freedesktop.org
Wed Feb 26 20:13:44 UTC 2025


== Series Details ==

Series: drm/xe/userptr: properly setup pfn_flags_mask (rev2)
URL   : https://patchwork.freedesktop.org/series/145509/
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
22f9cda3436b4fe965b5c5f31d2f2c1bcb483189
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 47f758bec213cbf17d0d1cba09e52bd93d6349ee
Author: Matthew Auld <matthew.auld at intel.com>
Date:   Wed Feb 26 17:47:49 2025 +0000

    drm/xe/userptr: properly setup pfn_flags_mask
    
    Currently we just leave it uninitialised, which at first looks harmless,
    however we also don't zero out the pfn array, and with pfn_flags_mask
    the idea is to be able set individual flags for a given range of pfn or
    completely ignore them, outside of default_flags. So here we end up with
    pfn[i] & pfn_flags_mask, and if both are uninitialised we might get back
    an unexpected flags value, like asking for read only with default_flags,
    but getting back write on top, leading to potentially bogus behaviour.
    
    To fix this ensure we zero the pfn_flags_mask, such that hmm only
    considers the default_flags and not also the initial pfn[i] value.
    
    v2 (Thomas):
     - Prefer proper initializer.
    
    Fixes: 81e058a3e7fd ("drm/xe: Introduce helper to populate userptr")
    Signed-off-by: Matthew Auld <matthew.auld at intel.com>
    Cc: Matthew Brost <matthew.brost at intel.com>
    Cc: Thomas Hellström <thomas.hellstrom at intel.com>
    Cc: <stable at vger.kernel.org> # v6.10+
    Reviewed-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
+ /mt/dim checkpatch aca765dd193ad1c98ca57c2e22303f1a91c9df94 drm-intel
47f758bec213 drm/xe/userptr: properly setup pfn_flags_mask




More information about the Intel-xe mailing list