Re: race between util_create_path() and util_delete_path()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/29/09, Florian Zumbiehl <florz@xxxxxxxx> wrote:
> Hi,
>
> as it's quite a bit of effort to actually verify this without much
> knowlegde about the structure of udev: Could it happen that
> util_create_path() and util_delete_path() do run in parallel for
> the same directory? After all, util_create_path() does handle
> the case where creation of the directory happens in parallel
> to it running, so it doesn't seem all that unlikely to me ...
>
> Florian

Events on the same device are serialized.  So you never have an "add"
event running in parallel with a "remove" event for the same device.
That covers most cases, but there might be an exception.

Consider two CHANGE events running in parallel.  Changes to symlinks
are recorded under /dev/.udev/names.  If the CHANGE events cause one
symlink to be removed, and a new symlink to be created with the same
name, I think you would get simultaneous calls to delete_path() and
create_path().

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux