diff options
| author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2026-09-01 21:50:38 +0300 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-09-30 12:49:01 +0200 |
| commit | 57889076afd1be890150c32ffde3b691fe5707c8 (patch) | |
| tree | 6a73f98a0e9d48c66038bc7a93826f50f31216e4 /tools/lib/python | |
| parent | b62e3db8cdc1680e1c3390591e872f485148541a (diff) | |
| download | linux-next-57889076afd1be890150c32ffde3b691fe5707c8.tar.gz linux-next-57889076afd1be890150c32ffde3b691fe5707c8.zip | |
drm/bridge: Fix unlocked list access in drm_bridge_attach()
drm_bridge_attach() inspects bridge->list to warn about bridges being
attached without a previous drm_bridge_add() call, but it does so
without holding bridge_lock.
The list head can be concurrently written by drm_bridge_add(),
drm_bridge_remove() and __drm_bridge_free() while they operate on
neighbouring entries of bridge_list or bridge_lingering_list, all of
them under bridge_lock. Hence the unlocked read is a data race, even
though it is unlikely to change the outcome of list_empty() in practice.
Perform the check with bridge_lock held.
Fixes: 76f1a9711b83 ("drm/bridge: add warning for bridges attached without being added")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Tested-by: Igor Paunovic <royalnet026@gmail.com> # RK3588 Orange Pi 5 Plus, dual HDMI
Tested-by: Robin Räber <robin.raebi@gmail.com>
Link: https://patch.msgid.link/20260901-dw-hdmi-qp-scramb-v11-14-bc12954a0688@collabora.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
