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