From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382189; b=yGGV1IX/5kGbPxcsPRDENLLYEUi5u8wazNbbtPPGqnjreeu0TgcL/cWCwzLjDujUzcZ6 HW+fPC1/0mrlDKqnWM740/IZ1RTsT0hEDVF/hZt/gbSqB9Icqo5BzufFkUa1YTWggRJog fF1ko4hGwybDIDbtIRAJ/R5Ym8MTXUOTcN5HHmlpKAoUSI3EVlleaUaN36YpHwU0zo+S6 eNY/WqDdAZYxRAPdzMi0MxRhLjjxCezskKD5qVtLowoftEgny+p4kNGDSiso4JCvn6r2z jLQeibTZHzxwvkuKO1DfTxjbx/Z6xFM5RjqtwQmayAIOLD7x8CCTw0Dz47yWqLh7LRg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382189; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=x69d+zDYxpvDC90TWKBIEACEzN+lgZMlGZnkme67o3g=; b=VM2SPNjFaBinZGqIC6wIEF5/FX8TZg4PAW2ODfOS+b91dMA20Eu+u+FhS96o5rnya5Co rF6tQ6wSjhbPyFCpCzo+gllD64TEqkBdm77V+/E8BaxSLZ9R7hS5J0oefkxy3TxKDZoSx KwPJtJK+iwsfHLf350wELaSQmUuNtRfnUWn97Y8IEh0Zl0gseB5endJ0abxoDelqwZB52 iue3c62sH/n3avjKwUgqT5nQlolKurdO53GjfQcijfOJ3VlG8qfAwqhhAC7+Tdsmq52Te ocDxX6hSe+qSzvWacG6x6nwqsrBu68dqoSQX39cuYJVQNYLPsn86ByfdOi90KYgzRnQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="k4/FhDmK"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A125606A322; Fri, 4 Dec 2026 11:03:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=k4/FhDmK Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5E7A1F000C2; Fri, 4 Dec 2026 11:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382189; bh=x69d+zDYxpvDC90TWKBIEACEzN+lgZMlGZnkme67o3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=k4/FhDmKqbwI9eOuhwI+gvBuPgU5FRsPH0xXvNA5YUPydTLLrDUBg7TZI6seA7RIH ui02AvPcrnL1a+EQVTtXsI1Fwww6+Y17M0Cvp50+MoUJURdRMPy22jYo0DrZ8Cv09h X00cw0znqxnHUOmeaAqFAkpWbktzgHZP7eCC5s4M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mohamed Ahmed , Thomas Andersen , Dave Airlie Subject: [PATCH 6.18 346/703] drm/nouveau: do not return early from a synchronous VM_BIND Date: Fri, 4 Dec 2026 19:04:05 +0900 Message-ID: <20261204100636.992779030@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mohamed Ahmed commit b1939b201353d803f09a8eb07aa69e44f8441701 upstream. A synchronous VM_BIND waits for its job with an interruptible wait and ignores the result. On a signal the ioctl returns 0 while the job is still queued. Userspace can then use the new mappings before the page tables are written, and the channel can take an MMU fault. Wait uninterruptibly. A synchronous job takes no syncobjs, so only the jobs queued before it on the same scheduler can delay it. Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Cc: stable@vger.kernel.org Signed-off-by: Mohamed Ahmed Tested-by: Thomas Andersen Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie Link: https://patch.msgid.link/20261117214352.337961-2-mohamedahmedegypt2001@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_sched.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/nouveau/nouveau_sched.c +++ b/drivers/gpu/drm/nouveau/nouveau_sched.c @@ -330,7 +330,11 @@ nouveau_job_submit(struct nouveau_job *j mutex_unlock(&sched->mutex); if (done_fence) { - dma_fence_wait(done_fence, true); + /* The job is queued and its VA space changes are applied. It + * can neither be restarted nor reported as failed, so wait + * until it has run. + */ + dma_fence_wait(done_fence, false); dma_fence_put(done_fence); }