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 299CDA00C3 for ; Tue, 29 Nov 2022 16:25:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B20B242D24; Tue, 29 Nov 2022 16:25:34 +0100 (CET) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by mails.dpdk.org (Postfix) with ESMTP id 5136C42686; Tue, 29 Nov 2022 16:25:30 +0100 (CET) Received: by mail-qv1-f46.google.com with SMTP id p12so9910022qvu.5; Tue, 29 Nov 2022 07:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yuv9u4Y9XEWQdiAFe8W75xu47E4T6ee6Br8A48gzXqI=; b=MIqyQB9mogeqKCKK6c3hRXpeHCyRVjQq3LCzVDKeCW4cLS9EP0QG+j2VvPDtGNvKgK AC26Pa++MiL3esW2dceRswRBuNxwlNAxXZBv8Q/eY1WOOjeYguf04ssIxi2pqle8kTW9 lUDlwGwHVfkI58LLmf87GzhDNHhGtnQX08/WZ33DbJgaDCuNR2Wkcqt2q5Xz9LTKeLdi hZMt6zOx439UzfBfQzIt1WD6yWRl8JQhtYkyMG0Nf9GjZSxc9IET1vSrrkhi5z2tucub M2FCtUeOF/66CTFCyiQ/f5wVmeLQ9bMcBPdCe+zIqSEFI2qRnkXZzupEoT4TWHqcVeVE n8DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yuv9u4Y9XEWQdiAFe8W75xu47E4T6ee6Br8A48gzXqI=; b=LwRgqtoYAmNEZchse4xU/RJWc1dLsvCaz99wMgS4U/wPHWoZDjALcT+BSCHKLqVrtJ s83joMPBduxni3uTS3AKHDNkcxIhjHKSjhA0DFR5tTl00hDOzOqWn2rcmWfMAzgf9fLy YfmjNwCPRgdjZrL7CxlY5LgAycsoCKOo/Iyd1Hjj5tFHp2bdbOJPe3+kGuYgAAasyGRB H2aOS8X5DSZm59Y/5qGqnZnRZ4HiiRLNd+vwY2k/yN0MePTr5F3CGOLNVq0Bu0Vfh4Ps 9Y3C8wjsfQTdnlV53RMbjhBuvR7bMMr/j8fL7pPxotnOQapu3tPfsZCtsmZ1RX2RJsFB D9tw== X-Gm-Message-State: ANoB5pnoMZUNcZae39JkHQU1tU8/w5jbfhRbQavNooP88JzbTW/Wtfxe GRFVOdyzURKLIvJl/D2i+II= X-Google-Smtp-Source: AA0mqf5Ddyh/gsXPWHlKZN5P3TX2LLG+rlRLC/S3vFunEn1E8YCjToCCpzWkHADtzqAyh3yo8FgGjg== X-Received: by 2002:a05:6214:481:b0:4bb:68f5:74ee with SMTP id pt1-20020a056214048100b004bb68f574eemr34165721qvb.85.1669735529732; Tue, 29 Nov 2022 07:25:29 -0800 (PST) Received: from ubuntu.home (bras-base-hullpq2034w-grc-26-74-12-221-152.dsl.bell.ca. [74.12.221.152]) by smtp.gmail.com with ESMTPSA id r2-20020ae9d602000000b006fb11eee465sm10663412qkk.64.2022.11.29.07.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 07:25:29 -0800 (PST) From: Luc Pelletier To: grive@u256.net Cc: dev@dpdk.org, stephen@networkplumber.org, konstantin.ananyev@huawei.com, Luc Pelletier , Matan Azrad , stable@dpdk.org Subject: [PATCH v4 3/5] failsafe: fix double release of port Date: Tue, 29 Nov 2022 10:25:15 -0500 Message-Id: <20221129152516.4513-4-lucp.at.work@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221110163410.12734-1-lucp.at.work@gmail.com> References: <20221110163410.12734-1-lucp.at.work@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 When a sub-device is hot-unplugged, rte_eth_dev_release_port is being called twice. Once indirectly via rte_eth_dev_close and once explicitly. Changed the code to remove the explicit call since it's not required and results in mistakenly releasing port 0 (due to zero'ing of memory being done in rte_eth_dev_release_port). Fixes: fac0ae546e5f ("net/failsafe: free port by dedicated function") Cc: Matan Azrad Cc: stable@dpdk.org Signed-off-by: Luc Pelletier --- drivers/net/failsafe/failsafe_ether.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c index 517126565f..3bfc446638 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -301,8 +301,6 @@ fs_dev_remove(struct sub_device *sdev) if (ret < 0) { ERROR("Bus detach failed for sub_device %u", SUB_ID(sdev)); - } else { - rte_eth_dev_release_port(ETH(sdev)); } sdev->state = DEV_PARSED; /* fallthrough */ -- 2.38.1