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=1796220921; b=f4WVzdzuq282AylBzor2kRRP6jmk78nVfil7RIoWG41g8ILskzPkg4lEKNnc/CyjOOxs xXbR/TwVqVgmvocyHHdTiu+DnGGn/MymQiUFkWztR6yJ58VXx9yYLAj+BOvLKxcWIHDVK kadpuOD915qO/5cRx1w4WTgDtGtKmUj6xV0yhaBV3i00lBAUdhlIQEXYUfBBYaCho3dTm hjwvD5GB9NbSGBkot9dj+cta1qb1+8HzE3QnR7Me1+0O1M4qsLj9WP0cxA/e7+7JULII2 KibXkMNDkv5Yk7YbprW+5QJSqzmws7ffkmBM3CZjxg6cHCEAJ1plQ0NPATfMq+dGbCQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796220921; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=u89XsmFCQbZ/4HvICRlK/zTkRgH22eFPWsgB/PMMap4=; b=Z7vpVbujXQiroasI+LlkIomaAwHLoJ3ofIgABvPSCAUnlkaaMH/F1YwEr+pZoKe4xYpR r7M8f1+Px3A7eq9ZIuD//F1lwrxcwVzsQtA43B8VM1fRLAx2IK6HgCQu0vbvRiA9xzP+z GzWBF8mHuH3nUMbgzeiOyxga1GqHXQze4tuX+LSrwhGhevM/NCfVADom7eYxNwCRPyyvH iNwX6r44GAtbKda7YCinETyCSr8q1JEW0dcRhoioqX7pTukLg9S4HKM/JQKSivU+gpFQo qu8VAakWN4SzewDh4nKMiaNQ4pjsughytSaFpvfm/yNYp+35falpwXi97OA6e+oOruQ== 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=dhcqLmBV; 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 4AF15606A33C for ; Wed, 2 Dec 2026 14:15:21 +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=dhcqLmBV Received: by smtp.kernel.org (Postfix) with ESMTPSA id 436681F00899; Wed, 2 Dec 2026 14:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796220920; bh=u89XsmFCQbZ/4HvICRlK/zTkRgH22eFPWsgB/PMMap4=; h=Subject:To:Cc:From:Date; b=dhcqLmBViQtY7h7t512hz7pgpHjPT9kcdfSjwQT5Si/f7L+n1YHoEZj4LypnNqp2I PGcydb+STwX8RK2lIpk/nhQK1SASfJwCX4Wbt0pH7Fr9u/RD/0TGdF+y3pidmIs66N rjUpPcjYkwDo05IM3NFGedDR2kHwCKIjGXAdQ6eE= Subject: FAILED: patch "[PATCH] drm/vmwgfx: reserve cursor MOBs before unpinning them" failed to apply to 6.6-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:30 +0100 Message-ID: <2026120230-headstone-facelift-dcb8@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.6-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.6.y git checkout FETCH_HEAD git cherry-pick -x 8a9b3b4c3a6cc95ea959183e20871d2421a6b986 # git commit -s git send-email --to '' --in-reply-to '2026120230-headstone-facelift-dcb8@gregkh' --subject-prefix 'PATCH 6.6.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); }