[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200618003916.26644-1-gaurav1086@gmail.com>
Date: Wed, 17 Jun 2020 20:38:49 -0400
From: Gaurav Singh <gaurav1086@...il.com>
To: gaurav1086@...il.com, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Tommi Rantala <tommi.t.rantala@...ia.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org (open list:PERFORMANCE EVENTS SUBSYSTEM)
Subject: [PATCH] [perf] Fix null pointer deference in nest_epollfd
Add a NULL check for worker before dereferencing.
Signed-off-by: Gaurav Singh <gaurav1086@...il.com>
---
tools/perf/bench/epoll-wait.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-wait.c
index 75dca9773186..42983eb7f82e 100644
--- a/tools/perf/bench/epoll-wait.c
+++ b/tools/perf/bench/epoll-wait.c
@@ -239,6 +239,9 @@ static void *workerfn(void *arg)
static void nest_epollfd(struct worker *w)
{
+ if (!w)
+ return;
+
unsigned int i;
struct epoll_event ev;
int efd = multiq ? w->epollfd : epollfd;
--
2.17.1
Powered by blists - more mailing lists