[PATCH 17/37] drm/display: bridge-connector: protect dynconn creation and destruction with a mutex
Luca Ceresoli
luca.ceresoli at bootlin.com
Wed Jun 10 06:30:10 PDT 2026
On Mon Jun 8, 2026 at 1:49 PM CEST, Maxime Ripard wrote:
> On Tue, May 19, 2026 at 12:37:34PM +0200, Luca Ceresoli wrote:
>> Bridge hotplug will make the connector dynamically created and destroyed
>> based on hotplug events.
>>
>> In preparation for that, add a mutex to mutually exclude connector creation
>> and destruction.
>>
>> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>
> What is the source of concurrency, and what are you protecting against
> exactly with that lock?
With bridge hotplug, the connector creation and destruction can be
triggered by different code paths, so we need to prevent to:
* start destroying a connector that has not been created fully yet
* start creating a connector while the previous one is still
being destroyed
Both conditions might happen startig with patch 36.
So I guess I'll just squash this patch into patch 36. The commit message
will become quite verbose but it amkes sense to do it all at once.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-arm-kernel
mailing list