* [PATCH] perf bench: Fix null check
@ 2022-03-11 13:07 Weiguo Li
2022-03-11 19:08 ` Davidlohr Bueso
0 siblings, 1 reply; 3+ messages in thread
From: Weiguo Li @ 2022-03-11 13:07 UTC (permalink / raw)
To: dave, dbueso, peterz, mingo, acme
Cc: mark.rutland, alexander.shishkin, jolsa, namhyung,
linux-perf-users, linux-kernel
We did a null check after "epollfdp = calloc(...)", but we checked
"epollfd" instead of "epollfdp".
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
tools/perf/bench/epoll-ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/bench/epoll-ctl.c b/tools/perf/bench/epoll-ctl.c
index 740ae764537e..134612bde0cb 100644
--- a/tools/perf/bench/epoll-ctl.c
+++ b/tools/perf/bench/epoll-ctl.c
@@ -106,7 +106,7 @@ static void nest_epollfd(void)
printinfo("Nesting level(s): %d\n", nested);
epollfdp = calloc(nested, sizeof(int));
- if (!epollfd)
+ if (!epollfdp)
err(EXIT_FAILURE, "calloc");
for (i = 0; i < nested; i++) {
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf bench: Fix null check
2022-03-11 13:07 [PATCH] perf bench: Fix null check Weiguo Li
@ 2022-03-11 19:08 ` Davidlohr Bueso
2022-03-12 13:49 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: Davidlohr Bueso @ 2022-03-11 19:08 UTC (permalink / raw)
To: Weiguo Li
Cc: dbueso, peterz, mingo, acme, mark.rutland, alexander.shishkin,
jolsa, namhyung, linux-perf-users, linux-kernel
On Fri, 11 Mar 2022, Weiguo Li wrote:
>We did a null check after "epollfdp = calloc(...)", but we checked
>"epollfd" instead of "epollfdp".
>
>Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf bench: Fix null check
2022-03-11 19:08 ` Davidlohr Bueso
@ 2022-03-12 13:49 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-03-12 13:49 UTC (permalink / raw)
To: Davidlohr Bueso
Cc: Weiguo Li, dbueso, peterz, mingo, mark.rutland,
alexander.shishkin, jolsa, namhyung, linux-perf-users,
linux-kernel
Em Fri, Mar 11, 2022 at 11:08:56AM -0800, Davidlohr Bueso escreveu:
> On Fri, 11 Mar 2022, Weiguo Li wrote:
>
> > We did a null check after "epollfdp = calloc(...)", but we checked
> > "epollfd" instead of "epollfdp".
> >
> > Signed-off-by: Weiguo Li <liwg06@foxmail.com>
>
> Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-12 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11 13:07 [PATCH] perf bench: Fix null check Weiguo Li
2022-03-11 19:08 ` Davidlohr Bueso
2022-03-12 13:49 ` Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.