summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2026-01-20 14:06:10 +0300
committerMatthew Auld <matthew.auld@intel.com>2026-01-21 13:07:18 +0300
commit9dd08fdecc0c98d6516c2d2d1fa189c1332f8dab (patch)
treea9582f7ddad2611f7737d6a7899a365805fdb0de /include
parent6cdaa5346d6f3f6116e607e49c92c2401390c267 (diff)
downloadlinux-9dd08fdecc0c98d6516c2d2d1fa189c1332f8dab.tar.xz
drm/xe/uapi: disallow bind queue sharing
Currently this is very broken if someone attempts to create a bind queue and share it across multiple VMs. For example currently we assume it is safe to acquire the user VM lock to protect some of the bind queue state, but if allow sharing the bind queue with multiple VMs then this quickly breaks down. To fix this reject using a bind queue with any VM that is not the same VM that was originally passed when creating the bind queue. This a uAPI change, however this was more of an oversight on kernel side that we didn't reject this, and expectation is that userspace shouldn't be using bind queues in this way, so in theory this change should go unnoticed. Based on a patch from Matt Brost. v2 (Matt B): - Hold the vm lock over queue create, to ensure it can't be closed as we attach the user_vm to the queue. - Make sure we actually check for NULL user_vm in destruction path. v3: - Fix error path handling. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reported-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: José Roberto de Souza <jose.souza@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Michal Mrozek <michal.mrozek@intel.com> Cc: Carl Zhang <carl.zhang@intel.com> Cc: <stable@vger.kernel.org> # v6.8+ Acked-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Arvind Yadav <arvind.yadav@intel.com> Acked-by: Michal Mrozek <michal.mrozek@intel.com> Link: https://patch.msgid.link/20260120110609.77958-3-matthew.auld@intel.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions