Skip to contentSkip to conversation

multipathd crash on shutdown

PATCH New Hannes Reinecke 1 participant 1 message Apr 30, 2008 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipathd crash on shutdown

On shutdown multipathd flushes its internal message queue; but we have to check if the messages on the queue are not empty.

---
 libmultipath/log_pthread.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
libmultipath/log_pthread.c +2 -1
index 5a82b6a..8976bfb 100644
@@ -33,7 +33,8 @@ static void flush_logqueue (void)
 		pthread_mutex_lock(logq_lock);
 		empty = log_dequeue(la->buff);
 		pthread_mutex_unlock(logq_lock);
-		log_syslog(la->buff);
+		if (!empty)
+			log_syslog(la->buff);
 	} while (empty == 0);
 }
 
Signature · 1 line
1.5.2.4