Blame SOURCES/open-iscsi-2.0.874-5-Make-event_loop_stop-volatile-for-safer-access.patch

e88930
From 3951c242d266689a8c856717b02b07c1fe193a31 Mon Sep 17 00:00:00 2001
e88930
From: Lee Duncan <lduncan@suse.com>
e88930
Date: Fri, 2 Dec 2016 09:22:02 -0800
e88930
Subject: Make event_loop_stop volatile for safer access
e88930
e88930
As suggested by Christian Seiler:
e88930
"Only minor thing is that you might want to mark
e88930
static int event_loop_stop; (usr/event_poll.c)
e88930
to be volatile, to be on the safe side when modifying it
e88930
from within a signal handler. Probably not really required
e88930
here (the compiler is not allowed to optimize out the
e88930
access anyway, since you call non-static functions within
e88930
the loop), but it doesn't hurt either, just in case... "
e88930
---
e88930
 usr/event_poll.c | 2 +-
e88930
 1 file changed, 1 insertion(+), 1 deletion(-)
e88930
e88930
diff --git a/usr/event_poll.c b/usr/event_poll.c
e88930
index 209ee0280c0a..ac2504404366 100644
e88930
--- a/usr/event_poll.c
e88930
+++ b/usr/event_poll.c
e88930
@@ -123,7 +123,7 @@ static int shutdown_wait_pids(void)
e88930
 #define POLL_ALARM	2
e88930
 #define POLL_MAX	3
e88930
 
e88930
-static int event_loop_stop;
e88930
+static volatile int event_loop_stop;
e88930
 static queue_task_t *shutdown_qtask; 
e88930
 
e88930
 void event_loop_exit(queue_task_t *qtask)
e88930
-- 
e88930
2.9.3
e88930