|
|
c896fb |
From 7592f62383e6143a54d89885e505834c4977c4a6 Mon Sep 17 00:00:00 2001
|
|
|
c896fb |
From: Mike Christie <mchristi@redhat.com>
|
|
|
c896fb |
Date: Tue, 16 Aug 2016 11:44:27 -0500
|
|
|
c896fb |
Subject: [PATCH 06/11] multipath-tools: check for initialized checker before
|
|
|
c896fb |
|
|
|
c896fb |
For bz from upstream commit:
|
|
|
c896fb |
|
|
|
c896fb |
commit b5773d46a4550c3c222bb415197e0bc5f09c1169
|
|
|
c896fb |
Author: Mike Christie <mchristi@redhat.com>
|
|
|
c896fb |
Date: Mon Aug 15 12:13:45 2016 -0500
|
|
|
c896fb |
|
|
|
c896fb |
multipath-tools: check for initialized checker before
|
|
|
c896fb |
|
|
|
c896fb |
This fixes a regression added with:
|
|
|
c896fb |
015f87b16a7797a17afd514aec46e65c2a1a2f73
|
|
|
c896fb |
|
|
|
c896fb |
We can hit a race where when pathinfo is setting up a path, the path
|
|
|
c896fb |
could have gone down already. In the DI_CHECKER chunk we then do not
|
|
|
c896fb |
run
|
|
|
c896fb |
get_state and attach a checker. Later when check_path is run
|
|
|
c896fb |
path_offline could still return PATH_DOWN or PATH_REMOVED and
|
|
|
c896fb |
get_state is again not run so we do not get to attach a checker. I
|
|
|
c896fb |
was then running repair_path since the state was PATH_DOWN, and we
|
|
|
c896fb |
then
|
|
|
c896fb |
hit a segfault.
|
|
|
c896fb |
|
|
|
c896fb |
This has us test if a checker is selected before running repair.
|
|
|
c896fb |
|
|
|
c896fb |
Signed-off-by: Mike Christie <mchristi@redhat.com>
|
|
|
c896fb |
---
|
|
|
c896fb |
libmultipath/checkers.c | 2 +-
|
|
|
c896fb |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
c896fb |
|
|
|
c896fb |
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
|
|
c896fb |
index fa7d8b7..6cd8d34 100644
|
|
|
c896fb |
--- a/libmultipath/checkers.c
|
|
|
c896fb |
+++ b/libmultipath/checkers.c
|
|
|
c896fb |
@@ -212,7 +212,7 @@ void checker_put (struct checker * dst)
|
|
|
c896fb |
|
|
|
c896fb |
void checker_repair (struct checker * c)
|
|
|
c896fb |
{
|
|
|
c896fb |
- if (!c)
|
|
|
c896fb |
+ if (!c || !checker_selected(c))
|
|
|
c896fb |
return;
|
|
|
c896fb |
|
|
|
c896fb |
c->message[0] = '\0';
|
|
|
c896fb |
--
|
|
|
c896fb |
1.8.3.1
|
|
|
c896fb |
|