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 81321A0032; Wed, 11 May 2022 10:50:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70D9C4113D; Wed, 11 May 2022 10:50:58 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9B47740042; Wed, 11 May 2022 10:50:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652259057; x=1683795057; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PMp85TLDMmjjqzH0shKK5Qo9aUZzjKSisYA4BaVDwFU=; b=lLwWQpQxc4d+jVRbPvuRwv3hSu3lEQrPkw5XGJuta/SsUiTRNecGblFg D1GC/aKwdN2eCDYYSUNTukZrBnsq7+8X8XredHU3qhVrh0/LDL9G41jxJ V3lT0I53XIfar3h2DWBFQtkOXte4dcYSAdACUI7pwZhtZREaIbyjY/Dh0 vTqIWxWiJXjBMTRaU/swVqVXDlyItroicuuMx6GlAL080ZnGAGOJU2/iW dMU5UIQuG9+Da0IqSbvvGXNnsSl1TAlnoelZJlqpPLU0akbuyQwsf8Zby SRSQQZZbKZRwmq5cWS38AzhF05T0d9nOzNIcinQN/Amw15Wos+t79h8c/ w==; IronPort-Data: A9a23:W5d9VaDFDQKnqhVW/57hw5YqxClBgxIJ4kV8jS/XYbTApGhx1DVTz WcdCjqDb/aMY2DxfYp1Pd+18BgA7JSHzINiTANkpHpgcSl2pJueD7x1DKtR0wB+jCHnZBs/t 63yv/GZdJhcoln0+Ev1atANilEljfrUHdIQMMadZmYpA1YMpB4J0XqPocZg6mJTqYX/UlrlV e/a+ZWFYgf4gmcsawr41orYwP9RlKWq0N8nlgFmD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dGaJZVj3HqAOPHzA75bx/bUu/emvPJgF1oE7lp jNWE5R8WQyZ0XtA8uT24AjyGGPfEytGTD2js1O7ZlwvbPxALLtLC2YUVgr19Ctpv0Oa/erFM pb+KgmT8MLAVGeUbqhhTeOEqW6AUNuG/Eohg== X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="269305177" X-IronPort-AV: E=Sophos;i="5.91,216,1647327600"; d="scan'208";a="269305177" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 01:50:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,216,1647327600"; d="scan'208";a="697484470" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 11 May 2022 01:50:55 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 11 May 2022 01:50:55 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 11 May 2022 01:50:54 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 11 May 2022 01:50:54 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 11 May 2022 01:50:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UI4ZzzvhpnccZIMveqfIkB83iQwtuCHndPxS10Wyc5ALaO7uWzLN4YRkYfUJEA7Ru1Ct1HSOvnUaAPkapndkwrvSADEJVaTO1xuLEaKP69FD+AukA9aKECd3IaXFYQ1DA72aJSaIh8h/G9h8wsSBLvMY7xb2v0QYn4VhrRu06BjM0DCF6bUCMDFqCO427WgQmmkRmxcM1+5DQp3cqdJj8E8yF8m5CYKoj0OWyaSNqP5TeyFiV1HKZ1q4AfDcaQIT7VkNBrqdJtZEClalZcDGcdERHXrNvqtbDEFZlukH1KPDBShyXDXcp+2xDLci91CrOCnNaqyC3FjQhUwptWaP5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PMp85TLDMmjjqzH0shKK5Qo9aUZzjKSisYA4BaVDwFU=; b=KKzKmyxoUf+aCwMkecdI0Ob2wcvlK6jKn8qToqA4Xb4HRPh33EeQz7Ugt+1S+Wf191DrupGfMNTutlhh4U9XnCKn1r59kOJCfqlHyuKuV5/sO3acPUiPoecIMuJYHwEwEFio6AVaiUkqKWkBOfCxFh28l9OJjirQPOvofyRuyneoGbDYfmqekvwGw3OPfWvvvmVdakWPnuYld21UHVlaDqSFpwZJ7f8SuaWn3xf/I7VbqOSvE/nLKWw6vURO816ECNOLO1EsuYE78Xp6MtDUb/JZ4ReoBicia8PwiDqbsNs+G5pSmNnWwZsnHOyt2d0gnnwWpxyr0TavLzPGJy/1CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4249.namprd11.prod.outlook.com (2603:10b6:5:1d9::29) by DM5PR1101MB2315.namprd11.prod.outlook.com (2603:10b6:4:53::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23; Wed, 11 May 2022 08:50:53 +0000 Received: from DM6PR11MB4249.namprd11.prod.outlook.com ([fe80::bcab:23a9:6291:473c]) by DM6PR11MB4249.namprd11.prod.outlook.com ([fe80::bcab:23a9:6291:473c%4]) with mapi id 15.20.5227.023; Wed, 11 May 2022 08:50:53 +0000 From: "Huang, Peng" To: "Zhou, YidingX" , "dev@dpdk.org" , "Wu, Jingjing" , "Xing, Beilei" CC: "Yang, Qiming" , "Zhang, Qi Z" , "stable@dpdk.org" , "Zhou, YidingX" Subject: RE: [PATCH v2] net/iavf: fix segfaults when calling API after VF reset failed Thread-Topic: [PATCH v2] net/iavf: fix segfaults when calling API after VF reset failed Thread-Index: AQHYWgcocRjVurkPAkuLLwxVKEc1b60ZdCdg Date: Wed, 11 May 2022 08:50:53 +0000 Message-ID: References: <20220421170827.2753175-1-yidingx.zhou@intel.com> <20220427152524.228930-1-yidingx.zhou@intel.com> In-Reply-To: <20220427152524.228930-1-yidingx.zhou@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.401.20 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4daf24b8-e13c-483b-dda5-08da332b5b27 x-ms-traffictypediagnostic: DM5PR1101MB2315:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UIxu4q8yuuMs6A/PVJfYxyzuFvHPUr3T2rR14X2JQTO0Lu2pc6A9YC/RT7+Dmj4kU52IF1g5fdMWEhCZysrobTIfStZ6O7JmIz/MFzSvJMMekYnXO/cA1KEb6LfFXPrQ18AjSECRLnRAKCPo2m1XmtFnD0yWnqTM/cYQ3L2Yt3dMfK2zDrVtn/f/kYt+Qqxw6IEs3TzBApvImSLPZDWC6pEDT/BSPz3oVYGhmORGRhxQqM1NCOFsDMru592KqR0aHa2Ft6NIaUM0br7QIO4GOBwko++LMinZX4IHM/Td6zZnGk6wf2nM015yFvs9mtiZKvrREB/30Li/QNx+Brb8TgI6wvZ9n4CmbEZxFwvi7mwzln4nSve7YZ1t7n+UuWt4+RGB5UxmOcGJaGiX94zlAV0DfNaAd1F3EcjeRLqtc7L49rDp2p2L6ss+DtPg9Qlb23ORZjxdHOYRHWQQ0ZyL0EzK6NO49ysv/YckgGr5GqeMzxU6nTGIrt8z3HKkIUqIszNR96v/XZ0X1ik0h0KfgJOXvUrI3UE30M5e5Y2coCj0BmwQPwee9ScWD5QJRfOjkJQxQadxHlec/NoY/SPpnMvdfoZUr4NQ+rXR1nfCpy95sw+wHVXZa7C6w85TkiEsHyC2ksV6K+dV8o8zPrvVuy4S4+DzhJx/0K8Cp9jPbxQ6sBTE2r88SGQUoxWO1dmafUHO2w4DZj0LMwiZ6RDKSA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4249.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(110136005)(9686003)(54906003)(8936002)(86362001)(52536014)(5660300002)(55016003)(53546011)(7696005)(316002)(6636002)(6506007)(4744005)(508600001)(38070700005)(66446008)(66476007)(66556008)(66946007)(76116006)(38100700002)(4326008)(33656002)(2906002)(71200400001)(107886003)(64756008)(8676002)(82960400001)(450100002)(186003)(83380400001)(122000001)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antisp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?Q?xmNrZMR4pA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4249.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4daf24b8-e13c-483b-dda5-08da332b5b27 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2022 08:50:53.1671 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EyzUWNR4Npq5DJgnAcmFVnWcVKJx8GZ7sxZ4uTh4rIStJsV7bnxZpIZ3++soZ9QLFSc0TX7F21m3+N1lhxXOQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2315 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Yiding Zhou > Sent: Wednesday, April 27, 2022 11:25 PM > To: dev@dpdk.org; Wu, Jingjing ; Xing, Beilei > > Cc: Yang, Qiming ; Zhang, Qi Z > ; stable@dpdk.org; Zhou, YidingX > > Subject: [PATCH v2] net/iavf: fix segfaults when calling API after VF res= et failed >=20 > Some pointers will be set to NULL when iavf_dev_reset() failed, for examp= le vf- > >vf_res, vf->vsi_res vf->rss_key and etc. > APIs access these NULL pointers will trigger segfault. >=20 > This patch adds closed flag to indicate that the VF is closed, and reject= s API calls > in this state to avoid coredump. >=20 > Fixes: e74e1bb6280d ("net/iavf: enable port reset") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yiding Zhou Tested-by: Peng Huang