lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7ba0d855-8b55-cb38-2740-c2a3495f3083@users.sourceforge.net>
Date:   Tue, 21 Nov 2017 21:10:56 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-kselftest@...r.kernel.org,
        Frederic Weisbecker <fweisbec@...il.com>,
        John Stultz <john.stultz@...aro.org>,
        Shuah Khan <shuah@...nel.org>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kosaki Motohiro <kosaki.motohiro@...il.com>,
        Olivier Langlois <olivier@...llion01.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Stanislaw Gruszka <sgruszka@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH] selftests: posix_timers: Make signal handling safer

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 21 Nov 2017 20:56:51 +0100

Use the data type "sig_atomic_t" for the variable "done"
so that it can be safely modified by a signal handler.

Fixes: 0bc4b0cf15708fca04095232c4e448634e94d029 ("selftests: add basic posix timers selftests")

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 tools/testing/selftests/timers/posix_timers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index 15cf56d32155..d64732c8b69a 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -20,7 +20,7 @@
 #define DELAY 2
 #define USECS_PER_SEC 1000000
 
-static volatile int done;
+static sig_atomic_t done;
 
 /* Busy loop in userspace to elapse ITIMER_VIRTUAL */
 static void user_loop(void)
-- 
2.15.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ