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=1796220914; b=swystMe4Chr+AxR35/uZ0/Grr/g6ML/JYk5HLof75taFOsifrJRpYsk+0zteIYxpmypy MG5JbakenkVe+Qq2hVpZrW9GKwC0Z0OrLdZ1YMyxS16W9RgloS6yCW1ndaB1kAZWHzEBH 75ElHp5K35yjG6XCbSHmw4+r1RcOXu2wgdDfSUGVUrUJ0yGa0hEd/cdsbQ+/cCc4+0atN 9Q6H2SccK7HMrhqC6upleUrD4bsk/v5hItMoB6bs61TrCwpIcxrBfeJ01x5sAabdSSlEe HS0NAAH1TA3slGfHmDNRb1Bet8rCyXG6pfR0QkAEbRy8WqofivbKAmUdyXxX20e9RXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796220914; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=RLf++WXqEKsipOU7dd7kv6QnHlpXXE7fXA3NysdhX3Q=; b=c0d45AXM5Zmu3/RzQEckRBK9xCMl30XjRL8ZQNMwisw2JlbQN7tPdey76wZKChDtdKqR BZt/81gwXQr7znB8b+rR3e1ebwXc+kboWGaxFscZb2Jv412xX2YLOxJgOx1+iYESLBVMJ 4t6BOoBA3WCFd0JFuLM2RVyzARi6JUgwU1NJVvYxO8hGTGzWxhyKp2hUWY5nZV65NxoRe CTmT3/M5Uebw3Y67j6SIQT4gx/xIo/aWy2ZWYj6WbC3+Ym95wz1Ul6v8bVL8ewRzjKWcT ZdGzUBn5eC1FCNOT4vQZ4gWQEoaf+h8OkGdCFfjX7Sl6wUrOdplqetBt734Fj55Moqw== 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=iLVdx0lN; 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 07E90606A32D for ; Wed, 2 Dec 2026 14:15:14 +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=iLVdx0lN Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03A941F00926; Wed, 2 Dec 2026 14:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796220913; bh=RLf++WXqEKsipOU7dd7kv6QnHlpXXE7fXA3NysdhX3Q=; h=Subject:To:Cc:From:Date; b=iLVdx0lNfqSzOm0WX7rrRuOBUauOx6facWzZ3UhVKlVm8BktGWdkTI93iTm7GyIN/ Rmbquuhkhm1exoA1eAlTnTzx5IXoVfnAdRP5l5zoRDX+aTyf3sLRO9i12N+Pp77Fkr kQhe66XaDcGqhz4Vyo8dG16UrFMhTFhcAAtZRoL8= Subject: FAILED: patch "[PATCH] drm/vmwgfx: reserve cursor MOBs before unpinning them" failed to apply to 6.12-stable tree To: zack.rusin@broadcom.com,maaz.mombasawala@broadcom.com,yunfeng.li.nb@gmail.com Cc: From: Date: Wed, 02 Dec 2026 13:54:29 +0100 Message-ID: <2026120229-triage-runway-6083@gregkh> 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-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 8a9b3b4c3a6cc95ea959183e20871d2421a6b986 # git commit -s git send-email --to '' --in-reply-to '2026120229-triage-runway-6083@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8a9b3b4c3a6cc95ea959183e20871d2421a6b986 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 27 Oct 2026 14:48:55 -0400 Subject: [PATCH] drm/vmwgfx: reserve cursor MOBs before unpinning them vmw_cursor_mob_destroy() unpins cursor MOBs when discarding an image from the plane's cache or destroying the cursor plane. It calls ttm_bo_unpin() without reserving the BO, although TTM requires its reservation to be held when changing pin counts and LRU membership. KMS clients issuing repeated nonblocking cursor updates can exhaust the cache and reach this path. On a lockdep-enabled kernel this triggers reservation assertions in ttm_bo_unpin() and ttm_resource_unevictable(). Reserve the MOB around ttm_bo_unpin(), then release the reservation before dropping the BO reference. Fixes: 485d98d472d5 ("drm/vmwgfx: Add support for CursorMob and CursorBypass 4") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Zack Rusin Reviewed-by: Maaz Mombasawala Tested-by: fausten Link: https://patch.msgid.link/20261027211729.646988-7-zack.rusin@broadcom.com diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c index 9e8ea9e07f40..b678e5b68db7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c @@ -166,10 +166,17 @@ static u32 vmw_cursor_mob_size(enum vmw_cursor_update_type update_type, static void vmw_cursor_mob_destroy(struct vmw_bo **vbo) { + int ret; + if (!(*vbo)) return; + ret = ttm_bo_reserve(&(*vbo)->tbo, false, false, NULL); + if (WARN_ON_ONCE(ret)) + return; + ttm_bo_unpin(&(*vbo)->tbo); + ttm_bo_unreserve(&(*vbo)->tbo); vmw_bo_unreference(vbo); }