After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685909 - [PATCH] Crash in gphoto2
[PATCH] Crash in gphoto2
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: gphoto backend
1.14.x
Other Linux
: Normal critical
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-10 19:45 UTC by Michael Terry
Modified: 2012-10-11 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.18 KB, patch)
2012-10-10 19:45 UTC, Michael Terry
committed Details | Review

Description Michael Terry 2012-10-10 19:45:11 UTC
This is downstream bug https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/984993

It seems that g_mutex_clear is being called on the gphoto2 backend's mutex twice.  This could happen if a mount failed, because release_device() will get called twice in that case.

Most of release_device() works fine when called twice.  Just not the mutex bit.

Really, the mutex shouldn't be cleared in that function.  It's initialized in _init, and just because one mount failed, doesn't mean a future mount won't succeed.  So we might need the mutex in the future.

Even if that weren't the case, there's no harm in keeping the mutex around until finalize, where it will only be cleared once.  So that's what the following patch does.
Comment 1 Michael Terry 2012-10-10 19:45:49 UTC
Created attachment 226197 [details] [review]
Proposed patch
Comment 2 Alexander Larsson 2012-10-11 09:26:19 UTC
Pushed to master and gnome-3-6.