Avoid race between ueventloop and uevqloop
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 2 May 2013 21:46:29 +0000 (16:46 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 6 May 2013 19:41:08 +0000 (21:41 +0200)
commit18b603d24ef330c313107c3921730ac9abadba2b
tree3b2d82316ca6daf38b57b3da07e351a93f4601e7
parentfe935b0a1b3d19074ba4285aa92f7c45f7ff7bd3
Avoid race between ueventloop and uevqloop

ueventloop sets up uevq_lockp and uev_condp, which uevqloop uses.
If uevqloop accesses these structures before ueventloop has
initialized them, it will not wake up to process uevents. This patch
statically initializes these structures so they will always be
initialized. Also, since calling LIST_HEAD(uevq) initializes it,
there is no reason to call INIT_LIST_HEAD on it later.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/uevent.c