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=1796383695; b=1SaQXrKV5fzyysKcTzk/mv83UiHyQwYy7x8Vx9WA1GbqXHSH4wMNxWMOB+4zhe3+BtUC BY1ijuWI2ZPNV66gguyeuDzdtZn5RDA3LbHYAQj3o9cWN0w0+Wd/+GfafqFfmXmXe8lAQ nCstrIPURpD1lF/OXt+vful6+G68BqWY1t+xHn3Pf4vtv7wfJVjinMplcyl7elQn7qzyx f+FW7xHQwSdUNVVdTgAQ2lZD3dEbZCf5/FN0OqJwJM/S6K+zbTTP9ycpoaWsWbYtxqgcq zC3AQp3jjbgG2A4i4XXV4mqUmxG10zxfg7h75FPwZly6pd9GTtHIwyWMx51RjYsGVZA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383695; 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=bniaBigQAB4A+JUnXYL2bMtYzH0QgyS4ybHkE6pJb+Q=; b=ZPuyrntSpjTIORKZAWRyxDbWOyvSaJw5Xu1dlY94m9af6qjgP+jjgB4Aep5TjWmjCt54 4M46Wp1KiuCF0JMxJJcV1/rCXyryhSE08Gke5V9BY2QvjroOkVv8ymfH7yviwhWdF38Et xMhVDXoyIiP2WFAHOVB7cgytAV+tj01Qj6xzQJ/TD3/dI0eQhjG6HOqExSid7M1o+8AmS SBXTtBzVmEj+c+uZBR4/3jHmdjxqjOQJ4KTqYLzlMfhAIFSJY74b9prFikS+DlhSqLOTs HKYG7hSAqHAedz/Jk4hLGx/cbVY1yUDgXVB6MoLAel/Q7gjPptd5zU4BmrZvTTd5R2g== 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=rey0hFBr; 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 57966606A322; Fri, 4 Dec 2026 11:28:15 +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=rey0hFBr Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BBFA1F000CE; Fri, 4 Dec 2026 11:28:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383695; bh=bniaBigQAB4A+JUnXYL2bMtYzH0QgyS4ybHkE6pJb+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rey0hFBraaoYlwdxtDZ5iINA1iekg0WCl1P/DnvuQcD5Iuqh9fBG3t4iXDarqkmV8 VeONjGzddr0JrwmTPyqog2H5EjyT67mvd3fuplJDETEbYbQPEiEX39wp41DdWIUR2c uleO3YJRmYEH18+gIUakmHvG1cAWoqDqGgwb9Ybw= 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.12 325/555] drm/nouveau: do not return early from a synchronous VM_BIND Date: Fri, 4 Dec 2026 19:06:08 +0900 Message-ID: <20261204100622.172733009@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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.12-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); }