aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/bench/epoll-wait.c
diff options
context:
space:
mode:
authorTommi Rantala2020-03-05 10:37:14 +0200
committerArnaldo Carvalho de Melo2020-03-06 08:30:47 -0300
commit7b919a53102d81cd2e310b4941ac51c465d249ca (patch)
tree73fcf2f9875c2d4337ebe94f9c2e3099ddf526d2 /tools/perf/bench/epoll-wait.c
parentf649bd9dd5d5004543bbc3c50b829577b49f5d75 (diff)
perf bench: Clear struct sigaction before sigaction() syscall
Avoid garbage in sigaction structs used in sigaction() syscalls. Valgrind is complaining about it. Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Changbin Du <changbin.du@intel.com> Cc: Darren Hart <dvhart@infradead.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lore.kernel.org/lkml/20200305083714.9381-4-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench/epoll-wait.c')
-rw-r--r--tools/perf/bench/epoll-wait.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-wait.c
index d1c5cb526b9f..f938c585d512 100644
--- a/tools/perf/bench/epoll-wait.c
+++ b/tools/perf/bench/epoll-wait.c
@@ -426,6 +426,7 @@ int bench_epoll_wait(int argc, const char **argv)
exit(EXIT_FAILURE);
}
+ memset(&act, 0, sizeof(act));
sigfillset(&act.sa_mask);
act.sa_sigaction = toggle_done;
sigaction(SIGINT, &act, NULL);