mpathpersist: fix one more crash possiblity
authorBenjamin Marzinski <bmarzins@redhat.com>
Sat, 13 May 2017 05:44:58 +0000 (00:44 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 17 May 2017 22:29:54 +0000 (00:29 +0200)
commitf21166a812a2cfb50ecf9550d32947c83103f83a
treef54676bb9b9e24288ab9f0a3ca9dd5b4248ec01a
parent290683c2baa9dd1d1a36c444d32b9fcfcd0070e5
mpathpersist: fix one more crash possiblity

when mpathpersist goes to rollback reservations, it doesn't do a
rollback (and thus doesn't create a pthread) on paths that didn't
successfully create a reservation in the first place. It also doesn't
do any rollbacks at all if the last path in the multipath device was down,
which is completely broken. However it still tries to join these
non-existant pthreads, causing crashes.  To fix this, set the status to
-1 (now MPATH_PR_SKIP) on threadinfos that don't get rollbacks, and
remove the broken path state checking.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmpathpersist/mpath_persist.c
libmpathpersist/mpath_persist.h