Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UPnP] Access to g_UserData must be protected #24296

Merged
merged 1 commit into from
Dec 24, 2023
Merged

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Dec 21, 2023

Description

Another easy one...access to the userdata map in UPnP must be lock protected before access. Those locks already exists on Register and Unregister. All those callbacks that are part of the diff are invoked by the library itself (thus from arbitrary threads) when remote renderers notify the player.

Found while sending bluray iso's from Kodi to another Kodi via UPnP. Since the simple menu is shown on the target player, it is not actually playing the file yet so playback is stopped on the "sender" and the "userdata" removed from the map (this should be fixed...). Later when you actually start the playback by selecting a track, the rendererer notifies the player of the event but the callback/userdata class no longer exists. If the callback happens when the userdata is being removed, kodi crashes.

@enen92 enen92 added Type: Fix non-breaking change which fixes an issue Component: UPnP v21 Omega labels Dec 21, 2023
@enen92 enen92 added this to the Omega 21.0 Beta 3 milestone Dec 21, 2023
@enen92 enen92 requested a review from ksooo December 21, 2023 20:15
@enen92
Copy link
Member Author

enen92 commented Dec 23, 2023

Good to go?

Copy link
Member

@garbear garbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not very familiar with UPnP, but here it looks like a mutex was added correctly

@enen92
Copy link
Member Author

enen92 commented Dec 24, 2023

Thanks garbear

@enen92 enen92 merged commit 791a6f6 into xbmc:master Dec 24, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: UPnP Type: Fix non-breaking change which fixes an issue v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants