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 A9C3BA0524 for ; Fri, 5 Feb 2021 12:30:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A25B718899F; Fri, 5 Feb 2021 12:30:49 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 9D1C11889A0 for ; Fri, 5 Feb 2021 12:30:48 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id f16so5724994wmq.5 for ; Fri, 05 Feb 2021 03:30:48 -0800 (PST) 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=QK4gm4HQYv24xLd6WMm9DF+ixdIjDEdnSPSCvQkMpKg=; b=qRo2O5CUjTmEr5IP5mR96nW3In6vJY6Uup11seNgKjm7XHUcqLwv8V2DcoAuCN5Y+1 qybqL8VDUttuMAwuN9fdgOc5raNPiekOLPX9MJi/zekEt6uClIwWOT3qWXRqhZgcsMS1 8Nk3dyqJ144nOG2u68LTtJjS2jzwYyfIMo2Z71gXFrO+Re8+jewjVzr1VUplOUodfiOg 6Pl83BgyiGtlS5USA8Z2aMrLqiOjYYhICX2hHBwLf23mT1Ap2sSEsbk1VLGc6/gxsDBg bEnKMsQ0H0EVZm4scNNlHbrGRSEqKQxffSEDH/S5d5e1XsvpKs85XBKOTda4xmEwArO7 HeYQ== 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=QK4gm4HQYv24xLd6WMm9DF+ixdIjDEdnSPSCvQkMpKg=; b=JOHVfW5uxuv0nBsH7UkDmQCmMetQ2Yyg9xE2MddmGM7fPHD4UhTVdIIIsqiyy+ADyY I4TZiK9NfwxgYls1Ua9Ok+JcKiA68d8ctB6d1z35RmXavAijELQ/FevGBp5GnBUovmAP osRlKodHDbn4PMLB+uwnNloS471w2xzl8Z31PiWiN0rKSACJ/QVbe42lz//AOiwTpths QYmnI7J4jPDzpr4zuJKSHZfCk1UBLGtXfcQ8UmfqEW5bxLNnwqGqhngwy3uERTsGc7Ye EAxFziSJsmGx0ZGzfzxlf3Tb4HtFiaB6YbsXotFotec/yl4EAK0crns9ToR0Zx8nXswk YN2A== X-Gm-Message-State: AOAM531yRg3bg4XuEnsLdgoyuFseOieHqKxPB45FACeqq/WALK80ff1V ySgHrqVjqOllfu/8fJRTYw0= X-Google-Smtp-Source: ABdhPJw8JG/pz6WEhFz39ER84qRe+jpxHF4gi7SayKUQpJY5i9aWWFJI6KxzAu/V5wQ+TKks/4XkaA== X-Received: by 2002:a1c:f417:: with SMTP id z23mr3214740wma.29.1612524648429; Fri, 05 Feb 2021 03:30:48 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q9sm9744848wme.18.2021.02.05.03.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:30:47 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Liron Himi , dpdk stable Date: Fri, 5 Feb 2021 11:16:34 +0000 Message-Id: <20210205111920.1272063-108-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mvneta: check allocation in Rx queue flush' has been queued to stable release 20.11.1 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/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/b3ff422b868710cc8e53302f07c01b80ed0fcea6 Thanks. Luca Boccassi --- >From b3ff422b868710cc8e53302f07c01b80ed0fcea6 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Mon, 7 Dec 2020 19:37:15 +0800 Subject: [PATCH] net/mvneta: check allocation in Rx queue flush [ upstream commit 565789662e7bc7608681cb93e3ccf7a4a2744f0b ] The function rte_malloc() could return NULL, the return value need to be checked. Fixes: ce7ea764597e ("net/mvneta: support Rx/Tx") Signed-off-by: Yunjian Wang Acked-by: Liron Himi --- drivers/net/mvneta/mvneta_rxtx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/mvneta/mvneta_rxtx.c b/drivers/net/mvneta/mvneta_rxtx.c index 10b6f57584..dfa7ecc090 100644 --- a/drivers/net/mvneta/mvneta_rxtx.c +++ b/drivers/net/mvneta/mvneta_rxtx.c @@ -872,7 +872,17 @@ mvneta_rx_queue_flush(struct mvneta_rxq *rxq) int ret, i; descs = rte_malloc("rxdesc", MRVL_NETA_RXD_MAX * sizeof(*descs), 0); + if (descs == NULL) { + MVNETA_LOG(ERR, "Failed to allocate descs."); + return; + } + bufs = rte_malloc("buffs", MRVL_NETA_RXD_MAX * sizeof(*bufs), 0); + if (bufs == NULL) { + MVNETA_LOG(ERR, "Failed to allocate bufs."); + rte_free(descs); + return; + } do { num = MRVL_NETA_RXD_MAX; -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:34.081330340 +0000 +++ 0108-net-mvneta-check-allocation-in-Rx-queue-flush.patch 2021-02-05 11:18:28.966694159 +0000 @@ -1 +1 @@ -From 565789662e7bc7608681cb93e3ccf7a4a2744f0b Mon Sep 17 00:00:00 2001 +From b3ff422b868710cc8e53302f07c01b80ed0fcea6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 565789662e7bc7608681cb93e3ccf7a4a2744f0b ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org