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 F2076A0032 for ; Fri, 18 Feb 2022 13:43:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED3FB40395; Fri, 18 Feb 2022 13:43:50 +0100 (CET) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id 5B37340E2D for ; Fri, 18 Feb 2022 13:43:50 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id m126-20020a1ca384000000b0037bb8e379feso8534701wme.5 for ; Fri, 18 Feb 2022 04:43:50 -0800 (PST) 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=hL+UqLAMDhpLlqHTWf1mPZSvUqqnfT8YFazhDdYx15k=; b=nU/InK5WeV/GOo6yYCVctl82DLPVRrLEc5zchK+EE/kUZREVG57iHu2mEmn+VUZPW+ 5yAwcYP0hczQYws50lSYhcKfCRrFKONudSQ2Np/wlAM/h2pEM+v591Ol9cgRtPj3F17M XO53Utc7dtfeDxSOCpHT7mWqS/TMdW07TYSBQ86qNeFYM/uaSpcUMkUle0IC2hDk44hx Ka1dEQiZIHPKKC9rKliU7ctoSI5f8jTowh2fy8qCKFD1svViX/iDQyDH/u8k3w4NeNli EY8vogtkjPNA/Fwz1+T66PKWHh637vZx73lmO/ErhpUy1IgThj+BRkUTcsU5F1rx6Xm6 PR8g== 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=hL+UqLAMDhpLlqHTWf1mPZSvUqqnfT8YFazhDdYx15k=; b=TvrJy5JhRHIxGVyZf6Ms6fPdneYXbGN/vUrCevyVw6nEtCt4wlEm9NvXS7cukwKVfn VBH0n5Eerhu/+xthH/OfvBE4L9VIQ9KcB2cG1pbMITzuO/8dIdGc9ity0K5vPGxNXPCX 3D6vuY5yvTeZdCxhXySQHf646O7jlPjhp6k5q1waaexLpG/WXupTdxH8bdnNz9VzN0jz XL7Gbp0y9oM1xoj1WfgZ8exsxMzOpiEKMatkmqhDvHzO64rFTyYeUmRtv8n/40cY5RR6 jaE31DPBfUF46+t+zv8vFKwPTkXGHubYFf7lq3OQmWOHUeZYboqLBW7uM/lkl4+sBbWi nwag== X-Gm-Message-State: AOAM531yq6ynyu2uQChvCN9IH7YHYc8R2yyZBa28k0q/+QgQWzmo/IuF FQGAfFq5++io5S/S3K82DyaCIG/zjliphx8U X-Google-Smtp-Source: ABdhPJxpbzNol4hMUb0YKNoxZlbF/kTBWxb+wMMDEtED/EwKy68QFfR8vXzBRPQTpJIfFp6JiF9cvw== X-Received: by 2002:a05:600c:204a:b0:37b:bcbd:47b1 with SMTP id p10-20020a05600c204a00b0037bbcbd47b1mr6894319wmg.103.1645188230125; Fri, 18 Feb 2022 04:43:50 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id u15sm49111324wrs.18.2022.02.18.04.43.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:43:49 -0800 (PST) From: luca.boccassi@gmail.com To: Weiguo Li Cc: John Daley , dpdk stable Subject: patch 'net/enic: fix dereference before null check' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:51 +0000 Message-Id: <20220218123931.1749595-82-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-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 20.11.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/463673460a3fd3a98b48c724865bb995f7aeb4a9 Thanks. Luca Boccassi --- >From 463673460a3fd3a98b48c724865bb995f7aeb4a9 Mon Sep 17 00:00:00 2001 From: Weiguo Li Date: Tue, 25 Jan 2022 20:00:49 +0800 Subject: [PATCH] net/enic: fix dereference before null check [ upstream commit a5f42986968a0699e070c56f1033aee5f90d2c12 ] Move memcpy to 'ah->key' after 'ah' null check Fixes: bb66d562aefc ("net/enic: share flow actions with same signature") Signed-off-by: Weiguo Li Reviewed-by: John Daley --- drivers/net/enic/enic_fm_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c index 36ba95943f..a083ec1ed8 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -2196,11 +2196,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in, memcpy(fma, action_in, sizeof(*fma)); ah = calloc(1, sizeof(*ah)); - memcpy(&ah->key, action_in, sizeof(struct fm_action)); if (ah == NULL) return rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "enic: calloc(fm-action)"); + memcpy(&ah->key, action_in, sizeof(struct fm_action)); args[0] = FM_ACTION_ALLOC; args[1] = fm->cmd.pa; ret = flowman_cmd(fm, args, 2); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:41.047011512 +0000 +++ 0082-net-enic-fix-dereference-before-null-check.patch 2022-02-18 12:37:37.762793528 +0000 @@ -1 +1 @@ -From a5f42986968a0699e070c56f1033aee5f90d2c12 Mon Sep 17 00:00:00 2001 +From 463673460a3fd3a98b48c724865bb995f7aeb4a9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a5f42986968a0699e070c56f1033aee5f90d2c12 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index bf04d714d0..d8718d17ef 100644 +index 36ba95943f..a083ec1ed8 100644 @@ -21 +22 @@ -@@ -2521,11 +2521,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in, +@@ -2196,11 +2196,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,