Skip to contentSkip to conversation

master - signals: fix comparison flaw

PATCH Heinz Mauelshagen 1 participant 1 message Apr 10, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a14a8cef2ff1ae5c9c946bde5a885667288e24d3
Commit:        a14a8cef2ff1ae5c9c946bde5a885667288e24d3
Parent:        9a689fb8f0a6b1675a4e819f4837bf2e0269832f
Author:        Heinz Mauelshagen <[email protected]>
AuthorDate:    Mon Apr 10 18:29:26 2017 +0200
Committer:     Heinz Mauelshagen <[email protected]>
CommitterDate: Mon Apr 10 18:41:28 2017 +0200

signals: fix comparison flaw

commit 9a689fb8f0a6b1675a4e819f4837bf2e0269832f fixed SIGINT blocking but introduced a comparision flaw to sigint_restore().

Related: rhbz1440766

---
 lib/misc/lvm-signal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/misc/lvm-signal.c +1 -1
index 15d8a6f..8a4ead4 100644
@@ -98,7 +98,7 @@ void sigint_restore(void)
 		return;
 
 	if (!_handler_installed ||
-	    --_handler_installed > MAX_SIGINTS)
+	    --_handler_installed >= MAX_SIGINTS)
 		return;
 
 	/* Nesting count went below MAX_SIGINTS. */