Re: Revisiting threaded udevd

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

 



Scott James Remnant wrote:
On Mon, 2008-12-22 at 11:25 +0000, Alan Jenkins wrote:

I have some time to look at this again now.

I was just looking at this myself, since it formed a natural part of the
performance testing I'm doing on Ubuntu.

I got as far as reapplying the patches to current git head, but then hit
a segfault :-(

Attached is the patch against head.

The segfault occurs in the udev_device_get_properties() call at the top
of udev_exec(), because that calls update_envp_monitor_buf() which calls
free().

I assume this is non-reentrant territory?

Odd. I have started and I've not seen anything like this. Maybe you're doing something wrong. I don't have time to look at or try your patch today :-).

libudev doesn't implement any locking itself. But AFAICS it's safe to use *different* libudev objects such as udev_devices from different threads. You generally don't need to modify the udev context object, so it seemed safe to share the context between threads (and just make sure to only call udev_ref/unref from a single thread).

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