From: Colin Ian King Date: Wed, 2 Mar 2016 12:55:22 +0000 (+0000) Subject: perf tests: Initialize sa.sa_flags X-Git-Tag: v4.6-rc1~165^2~12^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e17a0e16ca3a63d1bafbcba313586cf137418f45;p=thirdparty%2Flinux.git perf tests: Initialize sa.sa_flags The sa_flags field is not being initialized, so a garbage value is being passed to sigaction. Initialize it to zero. Signed-off-by: Colin Ian King Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1456923322-29697-1-git-send-email-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/arch/x86/tests/rdpmc.c b/tools/perf/arch/x86/tests/rdpmc.c index 7bb0d13c235f7..7945462851a4c 100644 --- a/tools/perf/arch/x86/tests/rdpmc.c +++ b/tools/perf/arch/x86/tests/rdpmc.c @@ -103,6 +103,7 @@ static int __test__rdpmc(void) sigfillset(&sa.sa_mask); sa.sa_sigaction = segfault_handler; + sa.sa_flags = 0; sigaction(SIGSEGV, &sa, NULL); fd = sys_perf_event_open(&attr, 0, -1, -1,