* [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters
@ 2020-11-12 17:43 pbhagavatula
2020-11-13 9:56 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2020-11-12 17:43 UTC (permalink / raw)
To: jerinj; +Cc: dev, Pavan Nikhilesh, stable
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
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 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index 6994ac453..6aeab8257 100644
--- 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 cant be <= 0");
+ return -EINVAL;
+ }
return ret;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters
2020-11-12 17:43 [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters pbhagavatula
@ 2020-11-13 9:56 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2020-11-13 9:56 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk-dev, dpdk stable
On Thu, Nov 12, 2020 at 11:13 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> 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>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-eventdev/for-main. Thanks
> ---
> app/test-eventdev/evt_options.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
> index 6994ac453..6aeab8257 100644
> --- 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 cant be <= 0");
> + return -EINVAL;
> + }
>
> return ret;
> }
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-13 9:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 17:43 [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters pbhagavatula
2020-11-13 9:56 ` Jerin Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).