multipath: bind lifetime of udev context to main thread
authorHannes Reinecke <hare@suse.de>
Tue, 16 Jul 2013 07:12:52 +0000 (09:12 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 16 Jul 2013 19:46:31 +0000 (21:46 +0200)
commit3ecfce73713ba1cc054c7aa32d83d7127b6a00ae
tree18870be085ea7789a24129e3ae23fd782568c012
parent79dfa439a9733f2a647cda8126ecd4ecea35fe88
multipath: bind lifetime of udev context to main thread

We have to tie the lifetime of the udev context to the thread
or program. The current approach by creating it on config_load()
will invalidate the context during reconfiguration, thereby
causing all still existent objects to refer to an invalid pointer.
And resulting in a nice crash.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmpathpersist/mpath_persist.c
libmpathpersist/mpath_persist.h
libmpathpersist/mpath_pr_ioctl.c
libmultipath/config.c
libmultipath/config.h
mpathpersist/main.c
multipath/main.c
multipathd/main.c