Skip to content

sd: fix race condition in vlc_media_source_provider_GetMediaSource

Pierre Lamot requested to merge chub/vlc:sd/getMediaSourceRace into master

T1:

  • calls vlc_media_source_Release
  • rc is decremented and equals 0
  • start calling vlc_media_source_Delete (provider->lock is not locked yet)

T2:

  • calls vlc_media_source_provider_GetMediaSource
  • locks provider->lock
  • vlc_media_source_provider_Find will return the node (not yet removed from the list)
  • vlc_media_source_Hold increments rc, assert as rc == 0

fix: #28891 (closed)

Edited by Pierre Lamot

Merge request reports

Loading