summaryrefslogtreecommitdiff
path: root/crypto/algif_rng.c
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2023-08-04 20:23:41 +0200
committerDanilo Krummrich <dakr@redhat.com>2023-08-04 20:34:31 +0200
commit0c0816d68d963302a7f4a7a28cc685f73263b964 (patch)
tree7593e11e40c647699126a533a5428da41cc02cee /crypto/algif_rng.c
parenta5ae331edb02b6645514f7632478733439e28b34 (diff)
drm/gem: fix lockdep check for dma-resv lock
When no custom lock is set to protect a GEMs GPUVA list, lockdep checks should fall back to the GEM objects dma-resv lock. With the current implementation we're setting the lock_dep_map of the GEM objects 'resv' pointer (in case no custom lock_dep_map is set yet) on drm_gem_private_object_init(). However, the GEM objects 'resv' pointer might still change after drm_gem_private_object_init() is called, e.g. through ttm_bo_init_reserved(). This can result in the wrong lock being tracked. To fix this, call dma_resv_held() directly from drm_gem_gpuva_assert_lock_held() and fall back to the GEMs lock_dep_map pointer only if an actual custom lock is set. Fixes: e6303f323b1a ("drm: manager to keep track of GPUs VA mappings") Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230804182406.5222-2-dakr@redhat.com
Diffstat (limited to 'crypto/algif_rng.c')
0 files changed, 0 insertions, 0 deletions