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 28312A0032 for ; Fri, 18 Feb 2022 13:45:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F30B40141; Fri, 18 Feb 2022 13:45:11 +0100 (CET) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id C0BF441140 for ; Fri, 18 Feb 2022 13:45:08 +0100 (CET) Received: by mail-ej1-f45.google.com with SMTP id p9so14780901ejd.6 for ; Fri, 18 Feb 2022 04:45:08 -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=Txw3N0Gk4x0BTM98H7v7uprVUwfyhT1CI92EzgoSGAM=; b=llzsO/lNb1e4Z3Lwtd5FtdKYFNXRJ5ZZLOeAVmE9eBQzR1rpVLgDH17QCMFoKTcHDE MmDsp99HHZKnQdMBi2OZ+emH1LgyCfm2GO+kT7MWzAN4UvVUqB80DFpLeAE0K1v1vrTV t/LIwmDaT8YgBjM8xjNsqfTT2pszkTL84fANhTJuoHx7l2lf9L7cp/HDKF10YPLuPZuP NMM9Z5oTa29/gX3CKZvdDTFnmIzX+qWghpKf88ZC0tOcJlOHhV9ybHakHXj+n/IYRt9w YZ9ZUrnPUGqP5PqaCS+GzM7RdbYGvr7eyDsl0kQCPhWLUPe/ZYgRNFs0zJRJyIeY2tZd Ml2Q== 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=Txw3N0Gk4x0BTM98H7v7uprVUwfyhT1CI92EzgoSGAM=; b=QjNK9KBKCeDEsgDuzBGXfJYTlwsMzVJCKg0681k0nGu2XGYsP4qiKUaNbyXiqqt5bQ hkeUhLnwyhMwfDX0HbXQX34L4ustXxN+W9BpKEC332qJ9PgE63dlT9YrX13kQpHJQiXU Llp1VxKg2lJhwulECZt2Cyq+EEZ2olGPcT3VdwomJlGpZiAARW/4IB15TY4vxCr9nVNg VBXU8Kl5RwACn0VoStwILU34cp+Rqklo99OgtLFcPpKEmlAjr1/ouCZmaXkik0vdRVKe 1jM5VYzuYfNquDexJrVGBMKS5aB0N84dbzuIXjvWGx6p1RElX1BpWm+Ia+Xp6Z1FQk07 X40A== X-Gm-Message-State: AOAM533iKj1cyR18Ev6+PLlZ+F2nxOvVUNaKUsruhzuOAHxiBBbmjVF1 HroVrczN5rbdDbtsfB0kGb0= X-Google-Smtp-Source: ABdhPJxupypsyNT2rES1qPbkjJUKcI7G352eVg8vs6v26fC3wlUuUiIQPLOYuFlOltHk/Ew72zTklQ== X-Received: by 2002:a17:906:4987:b0:6c9:e16a:b5bf with SMTP id p7-20020a170906498700b006c9e16ab5bfmr6147529eju.247.1645188308371; Fri, 18 Feb 2022 04:45:08 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id f26sm4357092edu.39.2022.02.18.04.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:45:07 -0800 (PST) From: luca.boccassi@gmail.com To: Weiguo Li Cc: Ferruh Yigit , dpdk stable Subject: patch 'net/memif: remove pointer deference before null check' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:39:18 +0000 Message-Id: <20220218123931.1749595-109-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/3915e71a30b0c5740c878003d172e8b4e5041eeb Thanks. Luca Boccassi --- >From 3915e71a30b0c5740c878003d172e8b4e5041eeb Mon Sep 17 00:00:00 2001 From: Weiguo Li Date: Wed, 9 Feb 2022 15:39:34 +0800 Subject: [PATCH] net/memif: remove pointer deference before null check [ upstream commit b6c0f464affcf0ec6fcf0a26e517692dc08244f4 ] There are duplicates of assignment here, the one before null check may cause a null pointer deference, so remove the previous one. Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") Signed-off-by: Weiguo Li Reviewed-by: Ferruh Yigit --- drivers/net/memif/memif_socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c index 16c6efee33..1a4eccaf10 100644 --- a/drivers/net/memif/memif_socket.c +++ b/drivers/net/memif/memif_socket.c @@ -396,11 +396,10 @@ memif_msg_enq_init(struct rte_eth_dev *dev) { struct pmd_internals *pmd = dev->data->dev_private; struct memif_msg_queue_elt *e = memif_msg_enq(pmd->cc); - memif_msg_init_t *i = &e->msg.init; + memif_msg_init_t *i; if (e == NULL) return -1; - i = &e->msg.init; e->msg.type = MEMIF_MSG_TYPE_INIT; i->version = MEMIF_VERSION; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:41.957571245 +0000 +++ 0109-net-memif-remove-pointer-deference-before-null-check.patch 2022-02-18 12:37:37.842795315 +0000 @@ -1 +1 @@ -From b6c0f464affcf0ec6fcf0a26e517692dc08244f4 Mon Sep 17 00:00:00 2001 +From 3915e71a30b0c5740c878003d172e8b4e5041eeb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b6c0f464affcf0ec6fcf0a26e517692dc08244f4 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 42f48a68a1..7886644412 100644 +index 16c6efee33..1a4eccaf10 100644 @@ -22 +23 @@ -@@ -402,11 +402,10 @@ memif_msg_enq_init(struct rte_eth_dev *dev) +@@ -396,11 +396,10 @@ memif_msg_enq_init(struct rte_eth_dev *dev)