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 84054A00C3 for ; Tue, 29 Nov 2022 15:50:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 421FC42D24; Tue, 29 Nov 2022 15:50:35 +0100 (CET) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by mails.dpdk.org (Postfix) with ESMTP id 61E4442C4D; Tue, 29 Nov 2022 15:50:32 +0100 (CET) Received: by mail-qt1-f177.google.com with SMTP id fz10so9037262qtb.3; Tue, 29 Nov 2022 06:50:32 -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=lSmubGUGYlsH9bBVKLeju5kGumZlAbavrJ9e8hUbsEHzbxNvhzimfBJwXCw/RODXiP GdC25PU69vMZsaOWdkfVL+w7zE0t03ViFRFen6l5XM0ONZAgsWoJrIxHZLn4C0+eXcOZ NcNapYpl7RqsxaAmqoh+BUhp4VG2DF84QFYXoHurFBw6aFy2PTFr7eOoFnOX6JwpCnDN 6mWP/QDsEs0Z4DMPh9hDycKv7oTLOGytgp9rgXW7dYDYPs1eJ7rQmZ7uXxvCxilo/uRq OOqEeON0oPiV3S8kFQEAVUH1mBcB3hZcaUzVk6xbXt4dH+1sSXNmX4JF3wEmQgPOmVcp Yapw== 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=pDDkJRB56Jj8WnEJ9Qhw4IAV7dptc5hX/TZUoXMnttMBGv8v9CSdhGeCPAfX8AkCOm PL/M/kyvNSESzYckQ7FtFfhjsmqyKeri/QlnrcKII8PdzZdJnjm4RLebDSMi2o3zATw/ p5CVHvoJI1Blc5iQFIAU2EsieVSgNznB4XeGDoZMdf5t9NbsHnkTWdIEROP10KxGYb1V Bz6zumT7rDEUWPsSoYEvxSRd1VPLbg4Gs/ZSOptt+FhOrcstOdUeg4xZZYlEeIqgMFFg P7yDetseFhlaFVzCd9BVAu8QTNXTpaqC2Wsro0CcvdkRl71avNcqsg6fsk/Gm35uE/14 g9iw== X-Gm-Message-State: ANoB5pm2OptXkxCvjf764iZx8OLfXBsQTOZH7p+uCU0JrGNDG/gxcbJC m2ybnOatXOBpeXF9MmBB3vc= X-Google-Smtp-Source: AA0mqf6uYxYptJ7eSZCNUStIArD3RJLH47GuZ/JRiuRyBfPdMg4geAJ12ondmrq/wXzb36B6qqhW6w== X-Received: by 2002:ac8:498a:0:b0:3a5:1c61:230c with SMTP id f10-20020ac8498a000000b003a51c61230cmr39613957qtq.29.1669733431818; Tue, 29 Nov 2022 06:50:31 -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 y14-20020a05620a44ce00b006fb7c42e73asm11068836qkp.21.2022.11.29.06.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 06:50:31 -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 v3 3/5] failsafe: fix double release of port Date: Tue, 29 Nov 2022 09:48:31 -0500 Message-Id: <20221129144832.2750-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