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 8A654A0093 for ; Tue, 19 May 2020 15:16:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 780841D998; Tue, 19 May 2020 15:16:49 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 180711C1E4 for ; Tue, 19 May 2020 15:16:48 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id z72so3535536wmc.2 for ; Tue, 19 May 2020 06:16:48 -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=dZT2EhSsMmX+8LUkmgLUggZOlFutXCheG9Kzv8kuNqc=; b=VlVk5VMV+SmtRDh9VXBhUEMbtuKPy+kQoRizUV+xU4ni/VLOaSpQuWaF9cpgDd1W+/ yV5IxOI0Y9GoD2TnpjQuuUxeBuflZfc8XzUXw5Xj2AfPC0ou3O3XVR73fWH5/pssxNTN vJ6zdQQZaqeQlWT8w2Iemh5IVN3JE2gyDXi3CIvRR/OcbUn1f3OZK9P9N+T0YWiLmVQU pm2m0kUe3/HzCT8r9wDCjKsPaDmLlIED9jK2CglZzRwznwO7EXvkcvTNqggsE92+07kk w/QnOYOWhdurVpZ3HGv6yKRRYTaC9UaewLCEFeEPGnoNCBVfFvanlqr85qrJCXGcWKX3 12Iw== 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=dZT2EhSsMmX+8LUkmgLUggZOlFutXCheG9Kzv8kuNqc=; b=fHkYlZA6P7KXyG81ccF7aGRPO5L9drOc9ed/fnEoPWGbAYBStc6AK5pCxW6RCEOmuP TJfNdq9/nPhlYVfgyta7PPSerfwiZJngIa0zv5OLPAZveFh/JBjy/mu1eI3JC1DSnOea XT+WPgflxuK/KOEKwLtkMRf3rufIACMs1kcErhqwAAG8L4uQpDhICsKHGl4Dl6LVgMOH vCVrieYrJISXJoZHXQiddaq/twMwSltv+TuDDPkDa+i6SJn7xtEKFmIzExAAR0TIx53S GjuK0bGPncq578b2R0Rk/VKB2Ioa53w4MltVarqU+XL5nZjTqowGExsSq1wusoddSM6D cn0Q== X-Gm-Message-State: AOAM530vuLA1gr2q7m0ngBsHsOjbV3XsSXCJce9hH6p1RB0pqNknBmxu ukm0dHZVGQn81oDTpRbaVB+QrWxfS5CJtcpX X-Google-Smtp-Source: ABdhPJyWsiu3BXm1k2E59MIzLrV1qf7slR7+rZLN6F3X6jpUaJeoDMJTSADPCoLtILy6gx5iEgZ5eQ== X-Received: by 2002:a1c:3bc5:: with SMTP id i188mr5432586wma.90.1589894207791; Tue, 19 May 2020 06:16:47 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p9sm21385572wrj.29.2020.05.19.06.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:16:47 -0700 (PDT) From: luca.boccassi@gmail.com To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Tue, 19 May 2020 14:05:45 +0100 Message-Id: <20200519130549.112823-210-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx4: fix drop queue error handling' has been queued to stable release 19.11.3 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" Hi, FYI, your patch has been queued to stable release 19.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 05/21/20. 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. Thanks. Luca Boccassi --- >From ead66a3fb93a254de0dcd91400a8ff2a81210dfb Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Wed, 6 May 2020 16:27:54 +0000 Subject: [PATCH] net/mlx4: fix drop queue error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 6f155c0b9de5a58b5653d3e81c553564984f3c36 ] The function mlx4_drop_get() creates pointer to a struct mlx4_drop and if needed allocates by rte_malloc. If the allocation is failed the function goes to label “error”, and there does dereference to a null pointer. Skip resources cleaning when the memory allocation is failed. Coverity issue: 146206 Coverity issue: 146146 Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx4/mlx4_flow.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 96479b83dd..2da4f6d965 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -981,12 +981,13 @@ mlx4_drop_get(struct mlx4_priv *priv) priv->drop = drop; return drop; error: - if (drop->qp) - claim_zero(mlx4_glue->destroy_qp(drop->qp)); - if (drop->cq) - claim_zero(mlx4_glue->destroy_cq(drop->cq)); - if (drop) + if (drop) { + if (drop->qp) + claim_zero(mlx4_glue->destroy_qp(drop->qp)); + if (drop->cq) + claim_zero(mlx4_glue->destroy_cq(drop->cq)); rte_free(drop); + } rte_errno = ENOMEM; return NULL; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:53.171424223 +0100 +++ 0210-net-mlx4-fix-drop-queue-error-handling.patch 2020-05-19 14:04:44.604655406 +0100 @@ -1,4 +1,4 @@ -From 6f155c0b9de5a58b5653d3e81c553564984f3c36 Mon Sep 17 00:00:00 2001 +From ead66a3fb93a254de0dcd91400a8ff2a81210dfb Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Wed, 6 May 2020 16:27:54 +0000 Subject: [PATCH] net/mlx4: fix drop queue error handling @@ -6,6 +6,8 @@ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +[ upstream commit 6f155c0b9de5a58b5653d3e81c553564984f3c36 ] + The function mlx4_drop_get() creates pointer to a struct mlx4_drop and if needed allocates by rte_malloc. @@ -17,7 +19,6 @@ Coverity issue: 146206 Coverity issue: 146146 Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand") -Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad @@ -26,10 +27,10 @@ 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c -index 793f0b090e..2a86382db7 100644 +index 96479b83dd..2da4f6d965 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c -@@ -980,12 +980,13 @@ mlx4_drop_get(struct mlx4_priv *priv) +@@ -981,12 +981,13 @@ mlx4_drop_get(struct mlx4_priv *priv) priv->drop = drop; return drop; error: