git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edbebd3
)
app/eventdev: check timer adadpters number
author
Pavan Nikhilesh
<pbhagavatula@marvell.com>
Thu, 12 Nov 2020 17:43:29 +0000
(23:13 +0530)
committer
Jerin Jacob
<jerinj@marvell.com>
Fri, 13 Nov 2020 08:52:11 +0000
(09:52 +0100)
Fix SEGFAULT when nb_timer_adapters command line parameter is
set to 0.
Fixes:
98c6292105d4
("app/eventdev: add options for event timer adapter")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
app/test-eventdev/evt_options.c
patch
|
blob
|
history
diff --git
a/app/test-eventdev/evt_options.c
b/app/test-eventdev/evt_options.c
index
6994ac4
..
0d04ea9
100644
(file)
--- a/
app/test-eventdev/evt_options.c
+++ b/
app/test-eventdev/evt_options.c
@@
-197,6
+197,10
@@
evt_parse_nb_timer_adptrs(struct evt_options *opt, const char *arg)
int ret;
ret = parser_read_uint8(&(opt->nb_timer_adptrs), arg);
+ if (opt->nb_timer_adptrs <= 0) {
+ evt_err("Number of timer adapters cannot be <= 0");
+ return -EINVAL;
+ }
return ret;
}