From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4BB41A09DE for ; Fri, 13 Nov 2020 10:56:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25FFBC8B0; Fri, 13 Nov 2020 10:56:53 +0100 (CET) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by dpdk.org (Postfix) with ESMTP id C3CFEC868; Fri, 13 Nov 2020 10:56:47 +0100 (CET) Received: by mail-il1-f196.google.com with SMTP id y18so698587ilp.13; Fri, 13 Nov 2020 01:56:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lRUkrR49e5dZ7Fuf5vbhNxjKRkMpzTIaC6ZpdZIuZp8=; b=Wjkdvo9x3DRfvyJ80gfXRJ/f8t2xu3rUNUx3qiuDiJfwrZIQ+L0hUd6bErgnqNN3vP aqgUPgNWs1/3ApEO8Lg+Hpnwf66IMCHMOrCXcDVVXAr3oX75BIE1ww19Y7vqEloGqlVx EfE6KW08gMax/O8CG47etHJ979SBuMZilpaEgOiaKpbI0DI+HxRbkeQMTeAob4ndM6eb DuC+zuRTZVCq78RolA/RJphYThxv/xT52qscQjj6mypiWYsgJcUatNh567bGBidgBUHZ ms5p/GryS+97WnmOuu7LTk9CrFQMNON9Pq8icDs+JYcGJ/ID/9G60fIdHiz+uRA+FbW6 +UdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lRUkrR49e5dZ7Fuf5vbhNxjKRkMpzTIaC6ZpdZIuZp8=; b=MtDk0Fh/2sb7OFkenjiEvMF1LCMv11njf8JQ8P4Xdra1YD13PMzlCArnKMX+sKzoRQ Oe5mvHmHeYmuCV3uOhZHceAcqb7gFFmX00X+ryIy/Qo7LQjkRwCJhOPhzE2QAKD3hCwQ rwPX/RDqXdYK1rmBT9uJjxXrBiqtel/8QgoaU+2hOISdoLBLEXXN1ETjX8EtxC6dvB6b w8EiBZR7kGWzpzxPok0gYf6FdV/BX7AZ3eE4XUkatEHuJyEh1ZDwnrZzy1la6qaFqYGc mOpWAoK7+bpqS32nNuJJGzA6L4b+OAYuyIp4lE+gE/QnCf9ClDhBrxMur4CCMZ6qHUaK 6e+A== X-Gm-Message-State: AOAM5319FWrzs+VGvJpLNmW2C5qc4JYNDRjZpcau8Yi5sOcfw9OB2vPy lzcLY1h6y74lPAXbwS0z6ED67kjwE2llYUtD5ls= X-Google-Smtp-Source: ABdhPJzmu2Op76lThVDwd05qCfDQ97/a/aMmWFG0cM0JBnCpcF3L4vVfS0zECx9iuvk9M6NUFeV3kZDOi11x9+5KMcU= X-Received: by 2002:a05:6e02:c61:: with SMTP id f1mr1230265ilj.60.1605261407243; Fri, 13 Nov 2020 01:56:47 -0800 (PST) MIME-Version: 1.0 References: <20201112174330.313-1-pbhagavatula@marvell.com> In-Reply-To: <20201112174330.313-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Fri, 13 Nov 2020 15:26:31 +0530 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/eventdev: fix segfault with incorrect timer adadpters X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, Nov 12, 2020 at 11:13 PM wrote: > > From: Pavan Nikhilesh > > 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 Acked-by: Jerin Jacob 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 >