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 while iterating with list_for_each_entry_reverse() Date: Wed, 25 Mar 2026 06:59:31 +1000 Message-ID: In-Reply-To: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-6-8bf786c5c7e6@bootlin.com> References: <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-0-8bf786c5c7e6@bootlin.com> <20260324-drm-bridge-alloc-encoder-chain-mutex-v5-6-8bf786c5c7e6@bootlin.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Two functions are protected: **`drm_atomic_bridge_chain_disable()`**: Uses explicit `mutex_lock`/`mutex_= unlock` around the loop. Bridge driver callbacks (`atomic_disable`, `disabl= e`) are called under the mutex. No early returns inside the loop, so the un= lock is always reached. **`drm_atomic_bridge_chain_check()`**: Uses `scoped_guard(mutex, ...)`. The= inner `return ret` at line 1314 will correctly trigger the scoped_guard cl= eanup, unlocking the mutex. Note the inner `int ret` declaration shadows th= e outer `ret` =E2=80=94 this is intentional and correct, as the inner `ret`= is only used for the return within the scoped block. No issues. --- Generated by Claude Code Patch Reviewer