[vlc-devel] [PATCH v6 3/7] upnp: Split s_lock into two locks to solve deadlock issue

Rémi Denis-Courmont remi at remlab.net
Sun Dec 15 14:50:41 CET 2019

Le sunnuntaina 15. joulukuuta 2019, 15.44.16 EET Johan Gunnarsson a écrit :
> On Sat, 7 Dec 2019, 19:39 Rémi Denis-Courmont, <remi at remlab.net> wrote:
> > Whether this might race or not depends on what thread safety guaranties
> > libupnp provides, if any.
> > 
> > The fact that there is a lock is a strong hint that it provides none, and
> > if so, it must be operated under a unique lock.

> The fact that libupnp deadlocks is IMHO an even stronger hint that
> s_lock should be split.

It's a hint that the lock is not handled correctly.

That does not change the fact that, AFAICT, libupnp is not thread-safe, and 
thus must be operated under a single lock - otherwise two threads using 
different locks could race.

Реми Дёни-Курмон

More information about the vlc-devel mailing list