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=1796386583; b=DnSCI/oSH/Y4ntYv5K6ASFTL2ES9Saq6vBt5ZrY7vB0dhYrS+zsalgbu2tEpVUjrVyU4 lmWXhfKKhHK9DM3ti02GDpIgLY+ZhKKKHVSYHTjODBOkoPVB6uXqMDAKSpy2Wnri3emv8 r4qYKqz2TJ27O97S2SYKdhqVn/5jnr1EjAym7V/LK/BLoO1ZW/mLj9JRygN49kPxlw9Jb AjWrD9JBP2vf2A4yPtHtmpu3UafLTt6cTnHYY/j6HssQFXJfSNMUIuIgG8D1zbvBHVCfB mxBpwHiR2bJQB2q5HiKoelPY9OdFkR1s8WXcLnawR9/BCzRutyD75GXsU3e/lyHgWmw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796386583; 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=od1avYlxQxtR0sUj7mg5xSOzF7x7iprJI2LnFy8kyS4=; b=wLw60Rb3dQuf8eDs661Vb0N/rwDvIroI4nLrldSTW0A0FNUvR/dIuSbl/DPOGo5z/E/j DnOdQvE6R22lEhDSI7h1uUNEhYxzp3RVr8rZ73GuwjjctJeRmGe5ogqGJf4wCWECiMpvS ZsB02v1DnSCMpbYj8bER0zYCgiZhbCstdzph8hVA9mJ98v2TLPYoAdDQ5JR2zuAlcQ9EQ U793C8acJnGo9i0ElmThzPS54plkmHosdt3j3urThOOc85K3r2dG5wIEtAiTB4qU8rG23 tT7EwadSFq+YfikS2MzLU4mwKEMAuFliESL43mS8s96GAHMK1EsLKHY+ijpyf5br//g== 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=OnXWuHDT; 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 D70C4606A322; Fri, 4 Dec 2026 12:16:23 +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=OnXWuHDT Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E0471F00897; Fri, 4 Dec 2026 12:16:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796386583; bh=od1avYlxQxtR0sUj7mg5xSOzF7x7iprJI2LnFy8kyS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OnXWuHDTHLV8T2XYw/goe/AUhZ28YZJeFjd6R6PU7GNugDIJJbDCTHkzL/uv6fhlX jkYgiGUjavKFywfGIZO4OkhBxo+sHJWvSP/szElq0/xmPVdoJ4+EYmSxIJxYZWu/Lj DmlsE37XNqUpBBoTY53CTZPQEav51h6xdI2XwzzQ= 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.6 0985/1167] drm/nouveau: do not return early from a synchronous VM_BIND Date: Fri, 4 Dec 2026 19:06:52 +0900 Message-ID: <20261204100727.856311668@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 @@ -329,7 +329,11 @@ nouveau_job_submit(struct nouveau_job *j mutex_unlock(&entity->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); }