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 59D90A00C5; Tue, 15 Feb 2022 13:02:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0187410F3; Tue, 15 Feb 2022 13:02:22 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id D97BD40E78; Tue, 15 Feb 2022 13:02:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644926541; x=1676462541; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=GumDxD3N60AbZJEcumLm6ODxxkNhl5ales2aLZ979yk=; b=ESf8GaFAN1+segLOhwA9SGpsjDJ107hI4Dh8sHG0xuYa+NrfE9tK+Ddg hqRXOfxno48ZhAtpLvLfOaTpHISrsbli5vsUhGZBgGkWNBsGmyhDzy2fK 2+3UqpgnMpwQNME/JoqscM7dH3cLusiVNQHoFa3TdkbLP7vO7apopB+E6 gK+fYBaW0+TyqZBYlYEECkP3STuF47zRYlb6VyWQkclsCdfXGRdtVSDA4 oR7pd2QCY0HPpqQT1Z6HiDaAceh5NGz85UYa87d126vmDVbZrLamIU68/ EeOR8ZdT1cCvkS0IH4ipdaQ8tYCJ/IwW5H1Ao4CB93xS1DmNKpvGHCGoI A==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="247932277" X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="247932277" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 04:02:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="773491795" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga006.fm.intel.com with ESMTP; 15 Feb 2022 04:02:19 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 15 Feb 2022 04:02:19 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 15 Feb 2022 04:02:19 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 15 Feb 2022 04:02:19 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 15 Feb 2022 04:02:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hDbyIc+fB7ltrLXNWGKgbMacWc09+qxfs3W6HBE3nNfAQc7890Ondh5caEhRb+s5Ah8l2f4xpJaWDYk4fgGvj1+Wg/tBa98nBgKlGxXCQQqG18tfvJtyz+geSIUpHkrzSBL8lVdZ6a67pCO9K/bSveczfCD8kSQ6KPrxO4mlkuKc6tbD4bZq025miqWL4rqiC3OpZEM5QQMxqGk+K9o2kGSl6SLqRCgHE6nIFhv/kKT1ED0hyCtq3YlNVN9q7UpmfqTVz0j8e5fSsJwaEfflGQDQRafSsJrLwiitszMViBo1HicHAIhWVzQ53iCwZri3AUvrZ9xQIwzQrcy8rxjd8w== 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=BXHJrCi0QhRGLtAX8pvs0kwAicHmwcwFOSXvDvi1zz8=; b=Tou0ifl+0VH8ayVUz1UD1Y2q7ZxY7pmNl0z+eXt8dyQzsYhV2F1aoGYqivYU7zzzrDm76aED9rDPNB7DJmGL5ZAV5eeXyBk3JW23qRKb5JK3e6ODHn/FD+ZWXiy4mhD31xeGIhfeGXAgcWoiDnN6YhRynFvay6i1XrH1jF5OeTAspdCRFu/nccO735HLTrc3VctrQrA6yOchqtCS6j3KtcV0mfn03KZnL/KpT11Mz00xbV0nnr7Ixcwg9YW7Xyz4/y1MqvcsEq4f85P+76hmzpQKttjq8e8fPMIrcQs1AUx7mvfanoQMsE2mwVbg4Mwj8cYLOCQV+zNufF1VIMhUQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BYAPR11MB3495.namprd11.prod.outlook.com (2603:10b6:a03:8a::14) by DM6PR11MB2682.namprd11.prod.outlook.com (2603:10b6:5:c3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.19; Tue, 15 Feb 2022 12:02:15 +0000 Received: from BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::714b:35f9:5767:b39b]) by BYAPR11MB3495.namprd11.prod.outlook.com ([fe80::714b:35f9:5767:b39b%6]) with mapi id 15.20.4975.018; Tue, 15 Feb 2022 12:02:15 +0000 From: "Wang, Haiyue" To: Yunjian Wang , "dev@dpdk.org" CC: "Yigit, Ferruh" , "Wu, Jingjing" , "Xing, Beilei" , "jiawenwu@trustnetic.com" , "jianwang@trustnetic.com" , "dingxiaoxiong@huawei.com" , "huangshaozhang@huawei.com" , "stable@dpdk.org" Subject: RE: [dpdk-dev] [PATCH 3/3] net/iavf: set pointer to NULL after free Thread-Topic: [dpdk-dev] [PATCH 3/3] net/iavf: set pointer to NULL after free Thread-Index: AQHYIlZZsLGH0MFtZkCH6Ji29vWN/ayUgrew Date: Tue, 15 Feb 2022 12:02:15 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 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: 68d8c8ed-b328-4d35-c8dd-08d9f07b023f x-ms-traffictypediagnostic: DM6PR11MB2682:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:660; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2cE6V3Q9xINzi05UOhmvFQJcUussXeq2hAP3P3aJVhupAOpS2Tr4zfckEUHysNckrT1AP13BjYdma+HmtI4FwG2zjt7cOvENs8OrIATfbViKQQA8dTxeAx5o3uSvVhE6ThXgznSmX9rWJ48cIBWKgM9ewwlTt2mAfp+XpmMwQENj+cIKFm4x2gqfc7E2Vyrewq8H7IXWe6rWFzV2UKL76Uf0bjDYi6RGO45+52YXiTUOd3E6MXab3VVa0wg67xX1/W1MhR8S8zZT4pDofidNo+NIY6dhxd41xEBGmG6ZlajgHGEhMFIcfV/4Clxhal4e7MH5Czb3iX+lj67+0gVkzSBNT6VVX8QAz5+5lF993WA1u07cPuX6r7UY3/SlID6Hgt6EBIZQUyNNhRTvy339e3+bA8d2opeSOxPSyTofnHLSN9qd0V4XYQknXjyHWhqPCGgr5v16fDHxH+KhEj5b2JCparTAzhV86w4225M+kkFkH5T/j9qUS+cwhw2Z85Fq/L0yApFcXC8n5rnYQo87GNDpqeP/X2+YVBlDXnqLPaiwF4mtxp4D+7oflMOrMk1TaLZ2R5s6GvlF0VXzp0sBNjbgksw9o2Fv7XoXCJ46J3UWGltTrJzismwiHer2bfr/mYBNMnJy7ym6HfNa+UPT2BqUJ5e3IZ2pCTxPMKvfl4hHpD1UT1FqTa1X/cOHsIwSIMXvOQjFJ/3t2VPkOk8Xbg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3495.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(55016003)(71200400001)(33656002)(2906002)(186003)(8936002)(5660300002)(26005)(76116006)(66556008)(64756008)(53546011)(8676002)(4326008)(66476007)(82960400001)(66946007)(52536014)(122000001)(38070700005)(66446008)(6506007)(110136005)(316002)(508600001)(38100700002)(54906003)(7696005)(86362001)(83380400001)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Zkz3hQgLBdZy7SzG21RYbeKKHgvkR5LINVhx8k1PwTlbEhv3L3kYYQu8IYxL?= =?us-ascii?Q?atQmqHiAotXQJhNA3snS/36G8p3okKX1Bj2LsmOCXYY3B5w1WBDBCrb4Wrkg?= =?us-ascii?Q?KOGPgw9LF/41UTsH7NdxHx1xc1xsCmA3CXn106paQ+2UyeMDr1h0tko5izIB?= =?us-ascii?Q?+QjSR6yHkv6vzuTZzU9oXrXoXZags/RK7JN6Moml12R1G8JUkQ0b+D4OqpmM?= =?us-ascii?Q?N2h0bKNUarfgcnZi/pn3oLQgZeqYSIP+J9Im+aPCM3lAJpPitApOR+yV/A01?= =?us-ascii?Q?QFY+8E/ys+v23qDG3iMYDR4OIsqPIgT/4K6nyzPiQiqAryfbQEZV3qJhVemp?= =?us-ascii?Q?mwWA6e5I6As/xNivqC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ascii?Q?CXdC4qw0uyPAf2vAGwhFWQl1qA1sKJYPMG4XOGHELmwP0mhw0R4MeOlKy23u?= =?us-ascii?Q?7bns8KWJTssXHFlkq9sSAMmXihUUJMMteG0EhO69VGUgSQGKW8OHg+yM+ifo?= =?us-ascii?Q?1898eUhgUdEfqYxCOC18T0ikfla7LFZFPcRlgzSrk8G4DdFQ32z5+f+0AFyz?= =?us-ascii?Q?WBAxIN8HyY0hUA9soR9Bxb/vQPVpfDCv636xx457306ueSwIAQyec6QR/qgE?= =?us-ascii?Q?JV+KGaXOB3O0vjrCfjQBm/sEtB9QRxVvkOMkdrNm2dK0N5uYUJI3lDxVQ/ab?= =?us-ascii?Q?XYHouM+UygH6hWGDjx5nniejK2rjwBlVG6lQBJfDEsUs0j8COPzKmCiyrcGU?= =?us-ascii?Q?jPMs5/3JB2xzHtPnspXY54g=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: BYAPR11MB3495.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68d8c8ed-b328-4d35-c8dd-08d9f07b023f X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2022 12:02:15.8076 (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: dq8fpupcH7lfqsmkonScEFSNeqlgXw64C95ZjIJy1tKzzzbRjIhxNmTKyD3WqLL73L+PNizsT8Ea8owLhGeNCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2682 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: Yunjian Wang > Sent: Tuesday, February 15, 2022 18:25 > To: dev@dpdk.org > Cc: Yigit, Ferruh ; Wu, Jingjing ; Xing, Beilei > ; Wang, Haiyue ; jiawenwu@t= rustnetic.com; > jianwang@trustnetic.com; dingxiaoxiong@huawei.com; huangshaozhang@huawei.= com; Yunjian Wang > ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH 3/3] net/iavf: set pointer to NULL after free >=20 > When iavf_security_ctx_destroy() is cleaning up, it does not correctly > set the security_ctx variable to NULL, which will lead to wild pointer. >=20 > Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto") > Cc: stable@dpdk.org >=20 > Signed-off-by: Yunjian Wang > --- > drivers/net/iavf/iavf_ipsec_crypto.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf= _ipsec_crypto.c > index 6ac1b213db..f13849ca1c 100644 > --- a/drivers/net/iavf/iavf_ipsec_crypto.c > +++ b/drivers/net/iavf/iavf_ipsec_crypto.c > @@ -1555,6 +1555,7 @@ iavf_security_ctx_destroy(struct iavf_adapter *adap= ter) >=20 > iavf_sctx =3D NULL; > sctx =3D NULL; The above two lines can be removed, since it is local var. > + adapter->vf.eth_dev->security_ctx =3D NULL; Also, adapter->security_ctx =3D NULL ? >=20 > return 0; > } > -- > 2.27.0