From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/bridge: prevent encoder chain changes in pre_enable/post_disable Date: Wed, 25 Mar 2026 06:59:31 +1000 Message-ID: In-Reply-To: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-7-8bf786c5c7e6@bootlin.com> References: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-0-8bf786c5c7e6@bootlin.com> <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-7-8bf786c5c7e6@bootlin.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Adds explicit `mutex_lock`/`mutex_unlock` around the outer loops in `drm_atomic_bridge_chain_post_disable()` and `drm_atomic_bridge_chain_pre_enable()`. As the commit message notes, there are no break or return points inside the outer loops (the `break` statements terminate the outer `list_for_each` which then falls through to the unlock), so the placement is correct. **Note on holding the mutex during callbacks:** Both `drm_atomic_bridge_call_post_disable()` and `drm_atomic_bridge_call_pre_enable()` call into bridge driver callbacks while the mutex is held. This is the same situation as patch 6. If a bridge driver's `pre_enable`/`post_disable` callback were to call `drm_bridge_attach`/`drm_bridge_detach` on the same encoder, it would deadlock. This is extremely unlikely but might warrant a `lockdep_assert_held` annotation or documentation note in the future. No blocking issues. --- Generated by Claude Code Patch Reviewer