Skip to content
Commit 404f3ea1 authored by Ross Lagerwall's avatar Ross Lagerwall
Browse files

udisks2: Prevent race between unmount reply and retry timer

Currently it is possible for the unmount op reply and the retry unmount
timer to race. A udisks2 unmount operation (or umount spawned command)
is started via the timer. In the meantime, a "cancel" or "force unmount"
reply is received which completes the gvfs unmount operation and frees
the private data. When the udisks2 unmount operation started by the
timer completes, it tries to use the freed data and segfaults.

To fix this, prevent starting an unmount operation when another is
already in progress.  If a timer callback is received while an unmount
operation is in progress, simply ignore it.  If an unmount op reply is
received while an unmount operation is in progress, store the result of
the reply and handle it once the unmount operation has completed.

https://bugzilla.gnome.org/show_bug.cgi?id=678555
parent 5162da08
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment