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

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

 



On 8/31/09, Kay Sievers <kay.sievers@xxxxxxxx> wrote:
> On Mon, Aug 31, 2009 at 11:22, Alan
> Jenkins<sourcejedi.lkml@xxxxxxxxxxxxxx> wrote:
>> On 8/30/09, Florian Zumbiehl <florz@xxxxxxxx> wrote:
>>>> 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?
>>
>> I was thinking of the sysfs path.  See event_queue_manager() and
>> devpath_busy() in udevd.c.
>>
>> It looks like (minor:major, subsystem) is also checked; I don't know why.
>
> That was for renamed/moved devices which are the same but have a
> different devpath. We have DEVPATH_OLD since a while, and the
> minor:major check is gone, right?

You're right, I was reading the source from an old checkout.  I was
puzzled by the subsytem check... but that would have been necessary
for block v.s. char devices.  Nevermind.

Regards
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