Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AC55606A330 for ; Thu, 3 Dec 2026 16:06:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mtMF9SoF Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0244B112B18; Thu, 3 Dec 2026 16:06:08 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F8F8112B18 for ; Thu, 3 Dec 2026 16:06:02 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 5D09060A00 for ; Thu, 3 Dec 2026 16:06:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 011F51F000C1; Thu, 3 Dec 2026 16:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796313961; bh=TOVN/suKftdPEsQKsnI42wwtYTYHzQyELkjxo+2pm1k=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=mtMF9SoFgfrWEXHU63LxkjZd/E+FFV+yAu49SPNItKUx28LUYdn5EsBN+hLNkOr4g 0JKCa0HM1916rDHsUQuGUk5qye8czCMY7ieTMkHleXDeGpX6zm29O4e6KTd/jf7pyf 3xM94slJckTGc0SFjV6JlmEDXFc/lZfAls/rEeVtPNGZ+oB9R5PWWuqNTTcEaVQup3 iyWCbAVLCgdibtRXSla+0ZeS3UL+KvO5yPZ7rQdQfJapJi2IDRi8KsQ4F5KtJMsds/ JLWjyBeb9He9eF8mWgOQuWV+WnZmXPxZKyTNJ+8N7NafGHIsRqvnOb9tUj9Jdx9nk3 OrdbJqgpjiVHA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v13 6/9] drm/vc4: Carry the HVS channel over to created CRTC states To: "Maxime Ripard" Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261203-drm-reset-state-flag-v13-6-b09f19f64e64@kernel.org> References: <20261203-drm-reset-state-flag-v13-0-b09f19f64e64@kernel.org> <20261203-drm-reset-state-flag-v13-6-b09f19f64e64@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 16:06:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] drm/vc4: KUnit test leaks modeset locks on KUNIT_ASSERT failure -- commit d86da181a3f3948d7fa9df62b1551aeb2cabcba4 Author: Maxime Ripard drm/vc4: Carry the HVS channel over to created CRTC states This commit copies the current HVS channel into newly created CRTC states in vc4_pv_muxing_atomic_check() when a CRTC remains enabled, and adds a KUnit test covering that path. > diff --git a/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c b/drivers/gpu= /drm/vc4/tests/vc4_test_pv_muxing.c > index 7a54f46acff91..c868d2cd1b3db 100644 > --- a/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c > +++ b/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c > @@ -1121,10 +1121,115 @@ drm_test_vc5_pv_muxing_bugs_subsequent_crtc_enab= le_too_many_crtc_state(struct ku [ ... ] > +static void > +drm_test_vc5_pv_muxing_bugs_created_state_keeps_channel(struct kunit *te= st) > +{ > + struct drm_modeset_acquire_ctx ctx; [ ... ] > + drm_modeset_acquire_init(&ctx, 0); > + > + drm =3D &vc4->base; > +retry_first: > + state =3D drm_kunit_helper_atomic_state_alloc(test, drm, &ctx); > + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, state); > + > + ret =3D vc4_mock_atomic_add_output(test, state, VC4_ENCODER_TYPE_HDMI0); > + if (ret =3D=3D -EDEADLK) { > + drm_atomic_commit_clear(state); > + ret =3D drm_modeset_backoff(&ctx); > + if (!ret) > + goto retry_first; > + } > + KUNIT_ASSERT_EQ(test, ret, 0); [ ... ] > + KUNIT_EXPECT_EQ(test, new_vc4_crtc_state->assigned_channel, old_channel= ); > + > + drm_modeset_drop_locks(&ctx); > + drm_modeset_acquire_fini(&ctx); > +} [Severity: Low] Can a failing KUNIT_ASSERT_* in this test leak the modeset locks held in ctx? Once vc4_mock_atomic_add_output() or drm_atomic_check_only() acquires modeset locks into ctx, any subsequent KUNIT_ASSERT_* failure exits the test kthread directly via kunit_try_catch_throw() without reaching drm_modeset_drop_locks() and drm_modeset_acquire_fini(). That trips lockdep's held-lock check on thread exit and leaves the locks linked onto the abandoned ctx.locked list, hitting WARN_ON(!list_empty(&lock->head)) in drm_modeset_lock_fini() during KUnit device teardown. Using KUNIT_EXPECT_* with a jump to a cleanup label would ensure the locks are released on failure. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-drm-reset-= state-flag-v13-0-b09f19f64e64@kernel.org?part=3D6