[lvm-devel] master - signals: fix comparison flaw

Heinz Mauelshagen heinzm at sourceware.org
Mon Apr 10 16:30:52 UTC 2017


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4e21159a7f2c8d2806890b743866a0b9702e7532
Commit:        4e21159a7f2c8d2806890b743866a0b9702e7532
Parent:        9a689fb8f0a6b1675a4e819f4837bf2e0269832f
Author:        Heinz Mauelshagen <heinzm at redhat.com>
AuthorDate:    Mon Apr 10 18:29:26 2017 +0200
Committer:     Heinz Mauelshagen <heinzm at redhat.com>
CommitterDate: Mon Apr 10 18:29:26 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(-)

diff --git a/lib/misc/lvm-signal.c b/lib/misc/lvm-signal.c
index 15d8a6f..8a4ead4 100644
--- a/lib/misc/lvm-signal.c
+++ b/lib/misc/lvm-signal.c
@@ -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. */




More information about the lvm-devel mailing list