Skip to content

Commit

Permalink
perf tests: Initialize sa.sa_flags
Browse files Browse the repository at this point in the history
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 <colin.king@canonical.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1456923322-29697-1-git-send-email-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Colin Ian King authored and Arnaldo Carvalho de Melo committed Mar 3, 2016
1 parent 9b24063 commit e17a0e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/perf/arch/x86/tests/rdpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e17a0e1

Please sign in to comment.