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 4637FA0524; Tue, 20 Apr 2021 03:38:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3A994155C; Tue, 20 Apr 2021 03:38:02 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 151AF41448 for ; Tue, 20 Apr 2021 03:38:00 +0200 (CEST) IronPort-SDR: uINw88FP8xRak3v57iJetF9GsxruZJxiOEnsP5ZfWP6Nnx84uDuARUiyj6EA7tmezERnuF8rEg Si1J+7UGTnqQ== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="192239600" X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="192239600" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 18:37:59 -0700 IronPort-SDR: KMZtm7MeDBTS8Ti3Hc0p6k81iOUumeUOhz4I0HtNj5s+mTHGYW74T3aNnbyxxCif9sa63FM9iT fTLPl2LaY74g== X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="452335060" Received: from agrady-mobl.ger.corp.intel.com (HELO [10.213.224.96]) ([10.213.224.96]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 18:37:58 -0700 To: "Min Hu (Connor)" , dev@dpdk.org Cc: chas3@att.com References: <1618470594-64612-1-git-send-email-humin29@huawei.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <42dd6d45-ad3c-c335-5354-89215ab8a6ed@intel.com> Date: Tue, 20 Apr 2021 02:37:55 +0100 MIME-Version: 1.0 In-Reply-To: <1618470594-64612-1-git-send-email-humin29@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix add bonded device itself as its slave X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 4/15/2021 8:09 AM, Min Hu (Connor) wrote: > From: Chengchang Tang > > Adding the bond device as its own slave should be forbidden. This > will cause a recursive endless loop in many subsequent operations, > and eventually lead to coredump. > > This problem was found in testpmd, the related logs are as follows: > testpmd> create bonded device 1 0 > Created new bonded device net_bonding_testpmd_0 on (port 4). > testpmd> add bonding slave 4 4 > Segmentation fault (core dumped) > > The call stack is as follows: > 0x000000000064eb90 in rte_eth_dev_info_get () > 0x00000000006df4b4 in bond_ethdev_info () > 0x000000000064eb90 in rte_eth_dev_info_get () > 0x00000000006df4b4 in bond_ethdev_info () > 0x000000000064eb90 in rte_eth_dev_info_get () > 0x0000000000564e58 in eth_dev_info_get_print_err () > 0x000000000055e8a4 in init_port_config () > 0x000000000052730c in cmd_add_bonding_slave_parsed () > 0x0000000000646f60 in cmdline_parse () > 0x0000000000645e08 in cmdline_valid_buffer () > 0x000000000064956c in rdline_char_in () > 0x0000000000645ee0 in cmdline_in () > 0x00000000006460a4 in cmdline_interact () > 0x0000000000531904 in prompt () > 0x000000000051cca8 in main () > > Fixes: 2efb58cbab6e ("bond: new link bonding library") > Cc: stable@dpdk.org > > Signed-off-by: Chengchang Tang > Signed-off-by: Min Hu (Connor) Applied to dpdk-next-net/main, thanks.