From nobody Sat Jul 25 03:05:56 2026 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1AD63B7750; Mon, 20 Jul 2026 08:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784537083; cv=none; b=uPnRw8LknSXUB5LXbF6YOYyeNFQR5NbEuoZqTLHiBHs7uhLcbn2oO8/GdOZYTlnmTCqZ7niG77CdmiBHLACH/cejdCSRziporlq3L575lB6ZbZ16kHiuMP30Qsu2+f9ayLrvAesNsDMvvjs5NMEbZB3ioBiIDSlBGCAR39ngqts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784537083; c=relaxed/simple; bh=M+AgluTbyBqHF1jgVfR5K7Xwvnx142Bwp9HT+86f0uo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tv32P1nKYUdiFckq2AKQsFeS1Rshz6bJtCWGEz+4B7AaJCxo5PVWn6hEYWYGKzbTY37vNmmmZKxRmqnNSF/76MFxVASfVYuNAZMoEE2RVxUi6qaiIWmUm5fTG/LNSev5JYtODy1leW2QK/wKonmHFSz5m9f4VWkBrwJ9rhrhPDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 3a0c2ad8841711f1aa26b74ffac11d73-20260720 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:d738c562-12fd-45df-8f52-0d50a9ebc522,IP:0,U RL:0,TC:0,Content:0,EDM:25,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:25 X-CID-META: VersionHash:e7bac3a,CLOUDID:d475da1185da431c400f533c082cfd77,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|850|865|898,TC:nil,Content:0|15|50,E DM:5,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA: 0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 3a0c2ad8841711f1aa26b74ffac11d73-20260720 X-User: lilinmao@kylinos.cn Received: from localhost.localdomain [(10.44.16.150)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 941170287; Mon, 20 Jul 2026 16:44:31 +0800 From: Linmao Li To: Maxime Ripard , Dave Stevenson Cc: =?UTF-8?q?Ma=C3=ADra=20Canal?= , Raspberry Pi Kernel Maintenance , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Eric Anholt , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Linmao Li , stable@vger.kernel.org Subject: [PATCH] drm/vc4: Shut down BO cache timer before teardown Date: Mon, 20 Jul 2026 16:44:26 +0800 Message-Id: <20260720084426.1632508-1-lilinmao@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The BO cache timer callback schedules time_work, and time_work can rearm the timer through vc4_bo_cache_free_old(). vc4_bo_cache_destroy() deletes the timer and then cancels the work, which does not break that cycle: the work being cancelled can rearm the timer, and the timer then queues work again after teardown. Use timer_shutdown_sync() instead, so the timer cannot be rearmed and the cycle ends with cancel_work_sync(). Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.") Cc: stable@vger.kernel.org Signed-off-by: Linmao Li --- drivers/gpu/drm/vc4/vc4_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 2161761b1f22..90a51bc31620 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -1044,7 +1044,7 @@ static void vc4_bo_cache_destroy(struct drm_device *d= ev, void *unused) struct vc4_dev *vc4 =3D to_vc4_dev(dev); int i; =20 - timer_delete(&vc4->bo_cache.time_timer); + timer_shutdown_sync(&vc4->bo_cache.time_timer); cancel_work_sync(&vc4->bo_cache.time_work); =20 vc4_bo_cache_purge(dev); --=20 2.25.1