* [dpdk-stable] [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-stable] [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters
2020-11-12 17:43 [dpdk-stable] [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-stable] [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters pbhagavatula
2020-11-13 9:56 ` Jerin Jacob
patches for DPDK stable branches
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
stable@dpdk.org
public-inbox-index stable
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.stable
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git