GNOME Bugzilla – Bug 735570
Race condition between close() and handle_tunnel() causing crash
Last modified: 2014-09-04 09:55:48 UTC
Created attachment 284663 [details] [review] patch in gst-rtsp-server Crash because when releasing tunnels lock in handle_tunnel(rtsp-client.c) it is possible for a another thread to run close that calls gst_rtsp_client_set_send_func that will unref watch and watch will bde desroyed. Solution is to release tunnel lock after call of gst_rtsp_watch_reset (opriv->watch);
Review of attachment 284663 [details] [review]: This look is only there for the tunnels hashtable AFAIU. Maybe a different one is needed here?
Created attachment 284681 [details] [review] new patch gst-rtsp-server New patch
Please try to write complete sentences in your commit messages :) commit 09bf2025f810cdad3127162dcce80a7dc73099e0 Author: Göran Jönsson <goranjn@axis.com> Date: Thu Aug 28 13:35:15 2014 +0200 rtsp-client: Protect saved clients watch with a mutex Fixes a crash when close() is called while merging clients in handle_tunnel(). In that case close() would destroy the watch while it is still being used in handle_tunnel(). https://bugzilla.gnome.org/show_bug.cgi?id=735570