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=1796220917; b=W8M0F2DcuqeN4iJ1oSgzmplzFNJg6PtcFdLgD6aSaW7RaTs8GpvG9OV6o/1djV1mF6du yqhfDyDQbiJG7zFloMChMNHqxdRm3z9kwYciZNu1F89NmbkGRyXwX/ZFsV9Z0dPBwOeAB YsQPoLqvv3zQBsATk/jUTYx+WTljJhVeUj4FxWEZr/4zIfAHhSywFv4L+d70XxtUWyvM4 MIjSOvFhbdlZ6VJnJWKanqXWvCsXfs++B4KjO2ImWh2Vcky7BmG+1J/HR3jsCVrg+x98F wlNugvpsNF/vh9FAjPEX0TYNmcau2v+TQo1VnnFOLASA3tq5t++78UuDzn4SJIcUqjA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796220917; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=hQhV5scXONzt/vS+dLXxhCc18tZbPZAPPYk3jmnw7rE=; b=sWApsJmHZZZdUmqJ7Qavo9rIt6odwhUPatYOM1y7ty6APCjtfPHeO0zI5i5H5rs4iwW8 rtM0JxLT11hgVWPk3boHm8jej0oxxpsCZw6zBwOJ77XeBq8+U+B5cuM0MrUh3+Eyskewa BxUHd9YwsTPN2BYteZeyYzmSLfpX+dlNHGy+7mqaM53DCpLmvKfgP9V+sumqIEKEyXOwi DvB8Op7KPJ8wIx3m4g2xeR8mdMqQGj8kEDKij//Z4s36bKLufviMG6L1IKQXCujwqJEXw rgN5DNHN2HRXGiSm5VOgPsjVgPfiBfNtpkQBkncunN2+CmYn7+xIci85jqyYxcLXrvw== 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=oO4vMtxM; 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 CCA2F606A32C for ; Wed, 2 Dec 2026 14:15:17 +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=oO4vMtxM Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8494E1F00927; Wed, 2 Dec 2026 14:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796220917; bh=hQhV5scXONzt/vS+dLXxhCc18tZbPZAPPYk3jmnw7rE=; h=Subject:To:Cc:From:Date; b=oO4vMtxM3EU8X9ahV0mn5dDxAyl7DriADFSbPyDcAHm0EQ8DKczRnXyvNUR3RRd39 l7CLEpSCl1FYPuhrB9a6ZFgJOYkFUIN8ILNx3uzAGflS6Ga3WcH0cryPC7DxK7hx1Z 4JRNacLDgfySk3kU7Dujq2IJ2/LleyqQWrRg0XIE= Subject: FAILED: patch "[PATCH] drm/vmwgfx: reserve cursor MOBs before unpinning them" failed to apply to 6.1-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-stardust-hate-d66c@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.1-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.1.y git checkout FETCH_HEAD git cherry-pick -x 8a9b3b4c3a6cc95ea959183e20871d2421a6b986 # git commit -s git send-email --to '' --in-reply-to '2026120230-stardust-hate-d66c@gregkh' --subject-prefix 'PATCH 6.1.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); }