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 1E7CDA0093 for ; Tue, 19 May 2020 15:13:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BDDE1D8F6; Tue, 19 May 2020 15:13:55 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id EAFCA1D702 for ; Tue, 19 May 2020 15:13:53 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id f13so3003449wmc.5 for ; Tue, 19 May 2020 06:13:53 -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=2dcgl5BwKQZh/hhcV1yEaYQ/jUUyfHXSlSZVWfPR6fg=; b=rw//voiqeYYIvvQ+DchzPV4lLMKIVW6KYNelGR93qMONcGHQf3JYypteE73szwSGV9 PdqWhZVLGPV3J+uUt+gMsT3GYaGQoT0L2XxpLoPyteKTPhwASmmiPk5NuRe0y0MwQnZn b/v97zq5ZsSvbKrcvQMjzbEQVkj1fj2vc3jBX/mTZ+8I5NhyJNvrgYRmOsFnH00rZcy5 MRZ1ZmGHXUGBbxzpP67o3N4qu0wYLg367KD51G6SSmj/90Z1PUX5Jl1pRDjA7L0EA8Ow Z/xxvX3HaEFq4F1HRJNMeCZFYsqolMlHN9rvnbiaRnzkuYicDz9o8WtG9mSmwtzT8oCR 25Tw== 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=2dcgl5BwKQZh/hhcV1yEaYQ/jUUyfHXSlSZVWfPR6fg=; b=KoRaH3qlzNFvUKur55yW7wJ4iMZxBp7MynOA96w0tGp/7kBfAhAnOJIRxldD2UONZd xMpdLcTgl8ruOoGkH1OLpH1GYcjtNyxj//wjxFGSwiyvkm6RwAEs1qOO8GQ0SBo48XrS Xp+01WJLdY/9MSpvePeMCPnoJJxNsWh1f8Zg/Z8XfCNDM1BOeAqmNpW7f4gn8cb6UPdQ loKv6aD3Bj+Z1V+J3SH9UO+BjEzqiLa9S9aRiTq/cO46Rlp9ZJ4wBg94kndieC/6acho RFBzI202rJBdrhULVQxvYNPBiSnEGwSoMPDasjdBkmp7LBY37w9DmWhiROD0Vd808cmp LSNA== X-Gm-Message-State: AOAM530ARdgvgR1eYaKZ2cFz3S8UwcCSOlHPGirZO1/auJOGypAJXE6F EutM3FmCcrT9fJbpFk8ixI0= X-Google-Smtp-Source: ABdhPJwUhEO8xR4B8ugSZ2qLIKfZddzXErmDMzGI5SthW9YtrJDSRzwQppRIMMkjPbeARgGsdry+4w== X-Received: by 2002:a05:600c:29a:: with SMTP id 26mr5797035wmk.151.1589894033714; Tue, 19 May 2020 06:13:53 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v24sm4053979wmh.45.2020.05.19.06.13.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:13:53 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Harman Kalra , dpdk stable Date: Tue, 19 May 2020 14:04:47 +0100 Message-Id: <20200519130549.112823-152-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-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/octeontx: fix dangling pointer on init failure' 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 ea6b087b9b8b40c7aa6f4ac50ff28fb75f364941 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 7 Apr 2020 19:35:43 +0800 Subject: [PATCH] net/octeontx: fix dangling pointer on init failure [ upstream commit 5ed5df8073c80d1af9ec8c89a8b2a5299463058d ] When octeontx_create() is cleaning up, it does not correctly set the mac_addrs variable to NULL, which will lead to a double free. Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table") Signed-off-by: Yunjian Wang Acked-by: Harman Kalra --- drivers/net/octeontx/octeontx_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 1d022e79a0..e85acdde0a 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -1124,6 +1124,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, free_mac_addrs: rte_free(data->mac_addrs); + data->mac_addrs = NULL; err: if (nic) octeontx_port_close(nic); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:50.639435754 +0100 +++ 0152-net-octeontx-fix-dangling-pointer-on-init-failure.patch 2020-05-19 14:04:44.480653158 +0100 @@ -1,13 +1,14 @@ -From 5ed5df8073c80d1af9ec8c89a8b2a5299463058d Mon Sep 17 00:00:00 2001 +From ea6b087b9b8b40c7aa6f4ac50ff28fb75f364941 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 7 Apr 2020 19:35:43 +0800 Subject: [PATCH] net/octeontx: fix dangling pointer on init failure +[ upstream commit 5ed5df8073c80d1af9ec8c89a8b2a5299463058d ] + When octeontx_create() is cleaning up, it does not correctly set the mac_addrs variable to NULL, which will lead to a double free. Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table") -Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Harman Kalra @@ -16,10 +17,10 @@ 1 file changed, 1 insertion(+) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c -index ea3b278a15..d5371ae07d 100644 +index 1d022e79a0..e85acdde0a 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c -@@ -1454,6 +1454,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, +@@ -1124,6 +1124,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, free_mac_addrs: rte_free(data->mac_addrs);