GNOME Bugzilla – Bug 692318
Protect against race between on_uevent and unmounting
Last modified: 2013-01-23 17:14:50 UTC
Created attachment 234128 [details] [review] Patch to fix error. I've never seen this happen personally, but an Ubuntu bug reported that on_uevent fired after the gudev client had been finalized, so it must be possible to race between an explicit unmount and physically unplugging a device. I made a brief attempt to reproduce this but couldn't. In any case, it's easy enough to protect against by taking a couple of measures: 1) Explicitly disconnect the signal handler before unref'ing the gudev client. 2) Use g_signal_connect_object to keep the backend alive enough for on_uevent to complete.
Review of attachment 234128 [details] [review]: Seems fine to me, the changes are harmless. Let's see if it resolves the issue. Please commit.
Thanks!