multipath: reference the udev context when starting event queue
authorHannes Reinecke <hare@suse.de>
Tue, 16 Jul 2013 07:13:15 +0000 (09:13 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 16 Jul 2013 19:52:04 +0000 (21:52 +0200)
commit6c99cf739bb94e4172b98d1ff5458e588552bd0b
tree4ae03d6e29b74ab6af2f12e650d5fb36ac0ef4dd
parent905281da5660bd186ca53d9afcc875a9d4aaf1fe
multipath: reference the udev context when starting event queue

The uevent listener is running asynchronously, so it might still
be active and receiving events when the main thread is already
shut down. So it need to take a separate reference to the udev
context to avoid the context becoming invalid while the listener
is running.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/uevent.c
libmultipath/uevent.h
multipathd/main.c