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

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

 



Hi,

> > 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?
> 
> Hmm. This is the problem, right?
> 
> 1 mkdir /dev/foo -> EEXIST
>  2 unlink /dev/foo/bar
>  2 rmdir /dev/foo -> success
> 1 mknod /dev/foo/qux -> ENOENT

I guess so :-)

> I think the solution is to audit the callers of create_path(), and fix
> them to retry indefinitely if the subsequent mknod / creat fails with
> ENOENT.

Seems like a rather dirty solution to me - what about serializing any
directory creation/removal plus subsequent object creation using flock()
on a lock file? Would still need changes at every call site, of course ...

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