From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 8F1E2160; Fri, 20 Jul 2018 12:09:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2018 03:09:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,378,1526367600"; d="scan'208";a="76388334" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by orsmga002.jf.intel.com with ESMTP; 20 Jul 2018 03:09:24 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: declan.doherty@intel.com, chas3@att.com, Radu Nicolau , stable@dpdk.org Date: Fri, 20 Jul 2018 11:02:37 +0100 Message-Id: <1532080957-26940-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-stable] [PATCH] net/bonding: set started flag at the end of dev start 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: , X-List-Received-Date: Fri, 20 Jul 2018 10:09:45 -0000 Race condition can appear in the bond_mode_8023ad_periodic_cb() callback when bonding port is stopped, reconfigured and restarted. Fixes: 2efb58cbab6e ("bond: new link bonding library") Cc: stable@dpdk.org Signed-off-by: Radu Nicolau --- drivers/net/bonding/rte_eth_bond_pmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fc4d4fd..6f66743 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2087,8 +2087,6 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) } eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; - eth_dev->data->dev_started = 1; - internals = eth_dev->data->dev_private; if (internals->slave_count == 0) { @@ -2167,6 +2165,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev) internals->mode == BONDING_MODE_ALB) bond_tlb_enable(internals); + eth_dev->data->dev_started = 1; return 0; out_err: -- 2.7.5