From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF160A00C3; Sat, 14 May 2022 15:11:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99A7C40683; Sat, 14 May 2022 15:11:02 +0200 (CEST) Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by mails.dpdk.org (Postfix) with ESMTP id D703A40395 for ; Sat, 14 May 2022 15:11:00 +0200 (CEST) Received: by mail-il1-f173.google.com with SMTP id 3so7537020ily.2 for ; Sat, 14 May 2022 06:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y3htJli3vMPjkfVc4Dg9ayu2O1xWb2558KRvzFnFE8c=; b=Ug8IWXFf9rUQJOUeoPbJlI1JqRpMfJD2k6hwuCYDzdMwf07yWwx2AxJrcs3rZnH6Ko YQH85LakiLnMUqWKtTyj5zewXRGVD3irJcnNlgM1bvPEQ25IyW8KjQ1MeuB4LRYDrWkQ eeB9f3pcIUAZi1k+XlAUs/4L/NlAewOWxhsmxl+XJvaIAVMELHRbsQM85vEA4oX0ZOk+ 79RFJgcSS6IpxkONfZSwVJKnQuDS62bPBWZrCr9W510W9Vj9zdOR/tLeC0PmZ3OSUsxc DNe3IxY8Dd43aI+I5ngb9vCxL3d8PLgwGtcNmxbeYK+m5siwPKfjSXcCFYvpNc5LEyEb qLrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y3htJli3vMPjkfVc4Dg9ayu2O1xWb2558KRvzFnFE8c=; b=t4nUr9M831cTv8lRtdN+9jy4+61Z1j3cfpxkEGSE1EQCwZ2WErekx+IJIy7fWt6YIw eendst3Aamv8I7tKJtPKShl8cl3J5xNUaz8AqKhJ47baPi+pFkqUw9kBhMbT2QSh4Pu6 j5sZChg58tViIBkquG7XW4CY2uo0IoOdXzVAUyylkxGmzPQKORTdy0edbw6HEXnjIxhu 2u+D974o3Bos17iVCJ8qaUSgSRPKqJeL/LMOC7K+B7bKkETNqlKzRohmpAUm5Vmfvm5f 4cPXdPoRJIlJlEvt3Q229drGYomru96CWUb5OaMFskXymnbtrpe2uaXDTSZLTE7j4u5o ySrQ== X-Gm-Message-State: AOAM532TXD90kLjD668Q37C1fNh4p90eaSwcHN5K6ZqAk5AzrKx5NF8l 2F5jiVu7451itKMpxQQ5Q2LT4xIxjcbfp7bL6YI= X-Google-Smtp-Source: ABdhPJyvMPNZPIjHiEID4BacSNt6C3JHSfxhwLihJZjCwjElp0ev2OLEGOHwtlSEkoCEbK6LZwEzUcjUrxVSOfGqKak= X-Received: by 2002:a92:2c11:0:b0:2d0:e874:636 with SMTP id t17-20020a922c11000000b002d0e8740636mr4948619ile.318.1652533860163; Sat, 14 May 2022 06:11:00 -0700 (PDT) MIME-Version: 1.0 References: <20220424162455.1681020-1-gmuthukrishn@marvell.com> In-Reply-To: <20220424162455.1681020-1-gmuthukrishn@marvell.com> From: Jerin Jacob Date: Sat, 14 May 2022 18:40:34 +0530 Message-ID: Subject: Re: [PATCH] event/cnxk: fix out of bounds access To: Gowrishankar Muthukrishnan Cc: dpdk-dev , Jerin Jacob , Pavan Nikhilesh , Shijith Thotton Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sun, Apr 24, 2022 at 9:55 PM Gowrishankar Muthukrishnan wrote: > > Fix out of bounds array access reporrted in coverity scan. Fixed reported typo > > Coverity issue: 375817 > Fixes: 2351506401e ("event/cnxk: add SSO selftest and dump") > > Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Jerin Jacob Applied to dpdk-next-net-eventdev/for-main. Thanks > --- > drivers/event/cnxk/cnxk_eventdev_selftest.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/event/cnxk/cnxk_eventdev_selftest.c b/drivers/event/cnxk/cnxk_eventdev_selftest.c > index 2fe6467f88..3aa6f081a7 100644 > --- a/drivers/event/cnxk/cnxk_eventdev_selftest.c > +++ b/drivers/event/cnxk/cnxk_eventdev_selftest.c > @@ -626,6 +626,12 @@ launch_workers_and_wait(int (*main_thread)(void *), > /* start core */ -1, > /* skip main */ 1, > /* wrap */ 0); > + if (w_lcore == RTE_MAX_LCORE) { > + plt_err("Failed to get next available lcore"); > + free(param); > + return -1; > + } > + > rte_eal_remote_launch(main_thread, ¶m[0], w_lcore); > > for (port = 1; port < nb_workers; port++) { > @@ -635,6 +641,12 @@ launch_workers_and_wait(int (*main_thread)(void *), > param[port].dequeue_tmo_ticks = dequeue_tmo_ticks; > rte_atomic_thread_fence(__ATOMIC_RELEASE); > w_lcore = rte_get_next_lcore(w_lcore, 1, 0); > + if (w_lcore == RTE_MAX_LCORE) { > + plt_err("Failed to get next available lcore"); > + free(param); > + return -1; > + } > + > rte_eal_remote_launch(worker_thread, ¶m[port], w_lcore); > } > > -- > 2.25.1 >