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 958E6A0540 for ; Wed, 6 Jul 2022 22:36:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A4D840691; Wed, 6 Jul 2022 22:36:38 +0200 (CEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id D47FC410E5 for ; Wed, 6 Jul 2022 22:36:35 +0200 (CEST) Received: by mail-wm1-f42.google.com with SMTP id l68so9466618wml.3 for ; Wed, 06 Jul 2022 13:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TslBnWBbh5mQDeZBPDFsQB3rounjRKYkxXiUNZuHZxk=; b=Xgkl//F4nIYV1WvyAL9kOBkU40W1ncJmjTQLAHwT46GAStLPt4Vx4doMgNMA1zRSOe qcfnNb4kSIQJDAXtVOgKNIxvePAKERdRGUWW6lXOlwsnh1smu/WKk2pR2QrQgykOO0Y/ T+7IMrBxXEgezPy+19fVQL1s1g/sRg4jLiSMmRlavQJTL5ym5qtOpceevVvd4bmpgw1O kckQYOR+x7Rfz8PQTPjdFbcABORRTVPzaBat/Sa2c2tuPekdP7npLKass2Lz8+pl8Bfz 249cfAaJNxDB5VI2RwtRh4aLJKIANp+y+ZEIFq+PEg5cuCPr43umfKWj+HcuHZ5i0vq/ uHow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TslBnWBbh5mQDeZBPDFsQB3rounjRKYkxXiUNZuHZxk=; b=Exk8NSs0KGhRhwvczW0gNJPF7WvgoR94Zfrqu4uxnywGR59xuW0dYXgj/0gYSSzR6b 0deefK7zWtfzZHvy4FoHmVDNAd6Tmif5g1uvLufZQRhEZ36HoI2fw4c3+Tw5jSQwIBVM fmHU4d9Fvh17Op5GmrUl1JbruzQv3HV5P5/8puegIiQUzDMHx6PSWu77Ll5UB2hGmhsG XV3/Vk5yXo9sLHW31dSTm3WK84OY8OqvDSVWcnWu2LnQvpVqoRxCTpTX6pGQB9zMrY7A +pAcfIt/iDpQQeAoks1gyL+jLI1XNkrsRDKS4ESyw01H9sXJfNsgYt60GTDDN1xn/cFq Y/yA== X-Gm-Message-State: AJIora9sgP5r1fe0nSdjRZSzXjsXPjpni4YjqB4raInu24TWqbJ8G5w4 TQsKH2UUJ/x25tHoiaF9Wq3o2sTuW+Gg2g== X-Google-Smtp-Source: AGRyM1t+OB0A1xECNstYfxXy9rSi+mXKsfZz2NkxKOYG7HKXHH8mlE2mWcbDnCLLoJtU8fnh2J1iBA== X-Received: by 2002:a1c:4b11:0:b0:3a0:4270:fcfa with SMTP id y17-20020a1c4b11000000b003a04270fcfamr445487wma.53.1657139795649; Wed, 06 Jul 2022 13:36:35 -0700 (PDT) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id h15-20020a1ccc0f000000b0039749b01ea7sm35701146wmb.32.2022.07.06.13.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 13:36:35 -0700 (PDT) From: luca.boccassi@gmail.com To: Thierry Herbelot Cc: dpdk stable Subject: patch 'app/regex: avoid division by zero' has been queued to stable release 21.11.2 Date: Wed, 6 Jul 2022 21:35:04 +0100 Message-Id: <20220706203506.3422496-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220706203506.3422496-1-luca.boccassi@gmail.com> References: <20220628151938.2278711-26-ktraynor@redhat.com> <20220706203506.3422496-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/08/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/81a0919f6a161209071407bc1e8b774308094ab5 Thanks. Luca Boccassi --- >From 81a0919f6a161209071407bc1e8b774308094ab5 Mon Sep 17 00:00:00 2001 From: Thierry Herbelot Date: Mon, 24 May 2021 10:57:00 +0200 Subject: [PATCH] app/regex: avoid division by zero [ upstream commit 1afdf9edc8f7122cdaf8dae78e29fe8642c21484 ] Check that nb_jobs is not zero before using it for a division. Fixes: f5cffb7eb7fb6 ("app/regex: read data file once at startup") Signed-off-by: Thierry Herbelot --- app/test-regex/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-regex/main.c b/app/test-regex/main.c index 756726f8db..564025bceb 100644 --- a/app/test-regex/main.c +++ b/app/test-regex/main.c @@ -732,6 +732,8 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Number of QPs must be greater than 0\n"); if (nb_lcores == 0) rte_exit(EXIT_FAILURE, "Number of lcores must be greater than 0\n"); + if (nb_jobs == 0) + rte_exit(EXIT_FAILURE, "Number of jobs must be greater than 0\n"); if (distribute_qps_to_lcores(nb_lcores, nb_qps, &qps_per_lcore) < 0) rte_exit(EXIT_FAILURE, "Failed to distribute queues to lcores!\n"); ret = init_port(&nb_max_payload, rules_file, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-06 21:07:54.557995572 +0100 +++ 0029-app-regex-avoid-division-by-zero.patch 2022-07-06 21:07:53.579519398 +0100 @@ -1 +1 @@ -From 1afdf9edc8f7122cdaf8dae78e29fe8642c21484 Mon Sep 17 00:00:00 2001 +From 81a0919f6a161209071407bc1e8b774308094ab5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1afdf9edc8f7122cdaf8dae78e29fe8642c21484 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ -index 7c014b2210..fe90e11313 100644 +index 756726f8db..564025bceb 100644 @@ -20 +21 @@ -@@ -728,6 +728,8 @@ main(int argc, char **argv) +@@ -732,6 +732,8 @@ main(int argc, char **argv)