On Thu, Nov 20, 2025 at 01:27:29PM +0000, Matthew Auld wrote:
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+
we never had any platform officially supported back in 6.8. Let's make it 6.12 to avoid useless backporting work.
Acked-by: José Roberto de Souza jose.souza@intel.com
Michal / Carl, can you also ack compute/media are ok with this change?
Lucas De Marchi