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

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

 



Hi,

> On 8/29/09, Florian Zumbiehl <florz@xxxxxxxx> wrote:
> > 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 ...
> 
> Events on the same device are serialized.  So you never have an "add"

what is the "same device" identified by?

> 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().

I was actually thinking about the much simpler case where there could be
two completely independent objects that happen to reside in the same
directory, or at least below a common path prefix, and one of them is
being removed while the other one is being created.

Well, I guess that that's one of those bugs I don't have enough insight
into udev for fixing, as there probably is no local fix that just touches
a few lines within one function - so, any suggestions as to how to proceed?

Florian
--
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