From: <pbhagavatula@marvell.com> To: <jerinj@marvell.com> Cc: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>, <stable@dpdk.org> Subject: [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters Date: Thu, 12 Nov 2020 23:13:29 +0530 Message-ID: <20201112174330.313-1-pbhagavatula@marvell.com> (raw) 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
next reply other threads:[~2020-11-12 17:43 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-12 17:43 pbhagavatula [this message] 2020-11-13 9:56 ` Jerin Jacob
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201112174330.313-1-pbhagavatula@marvell.com \ --to=pbhagavatula@marvell.com \ --cc=dev@dpdk.org \ --cc=jerinj@marvell.com \ --cc=stable@dpdk.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git