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