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 330E5A0C47 for ; Mon, 26 Jul 2021 15:56:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D80940DDA; Mon, 26 Jul 2021 15:56:21 +0200 (CEST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 57ADF40DDA for ; Mon, 26 Jul 2021 15:56:20 +0200 (CEST) Received: by mail-wm1-f48.google.com with SMTP id u15so2008341wmj.1 for ; Mon, 26 Jul 2021 06:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CTM36cnMewGbHQjiXsKnvPQsZlWzYhHhggA6zgC3A3Q=; b=qdC060t5MfVaEsTVWXgkWrKiSxDlPL0GxMvhk2GWqdshqogyFHIo8XG6NkWV4csouF yTOVYdm0XqUtgVX3oNH0T+ukz9Iry3vTYZIEEhc313MR63hbt8nMgJTI1CWk7e72Px58 QHgJjvms5OE7Q9IwotyUHHqz07leJBoWiZTdmOVIxK3ROj/+emnAv/5nbaqLKs4e/BJb EnDQz8cMyVBWhk5qZyFMvJNosLYStU409PAXJveu84hGhe1krvIpYR/XmNKlnWA6WNsf GpbmIPHVTEwxMO3ts4AM4NM8y7kvqb5APxITvFeVDCWYatkYLq3IUVRfV1LG9DCSfvsY a5SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CTM36cnMewGbHQjiXsKnvPQsZlWzYhHhggA6zgC3A3Q=; b=AU42EstXGMpfHgZsJ1LhmTpQwskBsr/IURMfFqWL2EaIS2A+tlXPbvx2Rk3p6ms7fL DL5Ejwb0UPJYTMD7aHIQt8LgJ84ryPiLH1D9WqKI0qrmYvo3Cw5yP/5WYn3bZejmVD78 X+Gb1X+bIK0etC5DVxC3Jlkt+BiCVC4Y75LpE0yskQsAlZSImLIOjq9ur2BZ7TIsU8Hl OYHr1BSTZ2J9rNPHwFjgGv40zrALO73KdkHZNtUhTXqG0LyDat8K8oyv3LH0gpt04Cxz 1cdJwCh2K86Y8H7JowtA2kre7CkI2T0hnqWb8rU4G/nTPKgOyAvcwK2WSZ68xgRM5T9P C21w== X-Gm-Message-State: AOAM533HNVyXQ+acLgiWLpDLFx9dJbFW9I34qWILKaPTO6OLtVva3BAF Jx48cvH3ZMbFjiUeXIslKe4= X-Google-Smtp-Source: ABdhPJyOpv3XAQf5M18zSjAfOIw9oQcKfCDU6IfiXRxWfHi7cUHYqH4Iy0qJYR4szeBDoJbn4fQjtw== X-Received: by 2002:a7b:ca45:: with SMTP id m5mr17285808wml.46.1627307780163; Mon, 26 Jul 2021 06:56:20 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id p8sm13421559wmc.24.2021.07.26.06.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:56:19 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Min Hu , Cristian Dumitrescu , dpdk stable Date: Mon, 26 Jul 2021 14:53:19 +0100 Message-Id: <20210726135322.149850-56-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'sched: fix profile allocation failure handling' has been queued to stable release 20.11.3 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 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/28/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/41a170fc81d6ca4ca9eb7ff6364fe5c4eaf95225 Thanks. Luca Boccassi --- >From 41a170fc81d6ca4ca9eb7ff6364fe5c4eaf95225 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 23 Apr 2021 19:01:11 +0800 Subject: [PATCH] sched: fix profile allocation failure handling [ upstream commit a042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c ] This patch fixes return value judgment when allocate memory to store the subport profile, and releases memory of 'rte_sched_port' if code fails to apply for this memory. Fixes: 0ea4c6afcaf1 ("sched: add subport profile table") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) Acked-by: Cristian Dumitrescu --- lib/librte_sched/rte_sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index cd87e688e4..df0ab5cab9 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -961,9 +961,9 @@ rte_sched_port_config(struct rte_sched_port_params *params) /* Allocate memory to store the subport profile */ port->subport_profiles = rte_zmalloc_socket("subport_profile", size2, RTE_CACHE_LINE_SIZE, params->socket); - if (port == NULL) { + if (port->subport_profiles == NULL) { RTE_LOG(ERR, SCHED, "%s: Memory allocation fails\n", __func__); - + rte_free(port); return NULL; } -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:19.205641754 +0100 +++ 0056-sched-fix-profile-allocation-failure-handling.patch 2021-07-26 13:53:15.969295145 +0100 @@ -1 +1 @@ -From a042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c Mon Sep 17 00:00:00 2001 +From 41a170fc81d6ca4ca9eb7ff6364fe5c4eaf95225 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -17 +18 @@ - lib/sched/rte_sched.c | 4 ++-- + lib/librte_sched/rte_sched.c | 4 ++-- @@ -20 +21 @@ -diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c +diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c @@ -22,2 +23,2 @@ ---- a/lib/sched/rte_sched.c -+++ b/lib/sched/rte_sched.c +--- a/lib/librte_sched/rte_sched.c ++++ b/lib/librte_sched/rte_sched.c