From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81EF3A0549; Thu, 16 Jul 2020 10:25:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D5B51BF90; Thu, 16 Jul 2020 10:23:43 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6E2BB1BED6 for ; Thu, 16 Jul 2020 10:23:31 +0200 (CEST) IronPort-SDR: 4wXDBeuk365N9uFZD6FRDJzexV02yZ/y3csKefNZ75YruawhwYmwGUx7oF/YWZ0tDv54iIVz76 4Fnpaw+kMrgA== X-IronPort-AV: E=McAfee;i="6000,8403,9683"; a="137466669" X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="137466669" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 01:23:30 -0700 IronPort-SDR: MCdwh6fFK+DSf/tNbsdYNhPnTiw55v3Y+3TLLgNa/ZDYd1M6JiEG7xPvmJUA7jCDYDxzo2e8aJ FVOQ9lGt3+ug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,358,1589266800"; d="scan'208";a="430418589" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 16 Jul 2020 01:23:30 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:23:30 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:23:29 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 01:23:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXfx2T6zpURsIlYoDnKtud4z/qlyzD4w6XWKo6vx4Lb6e4I2tDtEbPNe2p3GoxmM133I+xSx3fqUP6PJKCNwGpAGP/DpIrOKDfhmyYzpuXVkmEhBfzENCNKAr9xReVQaK1mEIAyNiIh38LPAh2KkhYFIjMTcikiEoP849rJ5GCQ4Q1rGUxSj9AuEVR2CFD3gZStboqeLJdT4PVs9wc9a3NnYnaXpVrAjA//zmWaac6oK/t+VjcXqu8inwSSpcBjNvtuwKYJ063og6kch1pEL6JxIbEOneNpeZcWsq1ig4sNb7dp9McP+SmsrxJk3hSENPlZdn52eo6RxfsatLdaINw== 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-SenderADCheck; bh=YOP23ZaFy4sKcQMqmhlTNp9P4yDJO/fKZ5dq5INXDAQ=; b=K//HjfCtw4pEiov2MYReghU8rkYLqPS19okRjFbiWr4nSE7QnPJzQGdwNZzK1Kr8UorkTBBpYkbUA0YUZc2D6rKceZRY1hY6Nwfw1KC3qlTtZ5402Ds7VqKv+lfrooCFO8lFy2LrHbuZm0qv82wUWdT7qrpdyV4e/lJuoBt37k+idps4apai8f2SGPpYGBWXOC8DrxfZ3KHzHy3gWd2LvYE8b+PVQmP808uQwa6sPejkm6SiH+CK6zlnEn5sbDKTG6aa5jAVZJEroZeOwXoxlcEN5ckPXmbQOkYCZ5ZnRUGXbVpSyCoR3LOj0nULP4+PgZ7nFIWOGsqwOmhl5LFpkw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YOP23ZaFy4sKcQMqmhlTNp9P4yDJO/fKZ5dq5INXDAQ=; b=Y85VafgNUjLn07DS9eOknx95s+nHFXQv+xLxHsy5vIr9NwVyNWebMN2j2PLwbFAXk1rpzO1dA58MNWkRNi/EQcRvDAVTl502HgzacLzcQdypr2X3mFJ4dWAFU/SjoU67DgPKna9SZDflCJQ2vThcsOdgggVPxTAdP4WTInvfV2c= Received: from MWHPR1101MB2254.namprd11.prod.outlook.com (2603:10b6:301:58::11) by MWHPR11MB1758.namprd11.prod.outlook.com (2603:10b6:300:10f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Thu, 16 Jul 2020 08:23:28 +0000 Received: from MWHPR1101MB2254.namprd11.prod.outlook.com ([fe80::206d:f3f3:b571:41ee]) by MWHPR1101MB2254.namprd11.prod.outlook.com ([fe80::206d:f3f3:b571:41ee%11]) with mapi id 15.20.3195.017; Thu, 16 Jul 2020 08:23:28 +0000 From: "Xiao, QimaiX" To: "Fu, Patrick" , "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" CC: "Wang, Yinan" , "Fu, Patrick" Thread-Topic: [dpdk-dev] [PATCH v1] vhost: set zmbufs to NULL when freed Thread-Index: AQHWWnZ1iZG8sQJapkOGKpdQjCwAxKkJ37JA Date: Thu, 16 Jul 2020 08:23:28 +0000 Message-ID: References: <20200715155848.9501-1-patrick.fu@intel.com> In-Reply-To: <20200715155848.9501-1-patrick.fu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.46] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c85cfc47-b52a-4d15-d3ff-08d829618472 x-ms-traffictypediagnostic: MWHPR11MB1758: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1388; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xdrHzol8VOBc9wPtHOTKcfGmvrPzzE0DKFfAF3qEwgEvZOinzdnmZzwJLUIcytUh4JutntyrUT1TyqU0gz6z+yO9kS73QnRMrOhcyuHrYOC2JkgzOkgzROvh2iZa+ZzUJdaJmT0ahBnuPPWAb56Xlt4UOzprS9zVzEG8Q/Do5wbLlSXyjK/nPko60dTpd8jtk6vN2ofkauyAn5OBMkzBqvMU8r1lpMpL9UYLR29ssDh/aTdcFeUH2ZyMtmGG/y1L23kiyhkz6063n/LLHX6Rq1WkfcCbgfNMgfWX7FEXugBV1pOov5Uf9hoW6XKV0C+DzEnFsNbQINWaOQJfvcZQUg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1101MB2254.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(8936002)(66556008)(52536014)(66946007)(64756008)(66446008)(110136005)(8676002)(66476007)(4744005)(5660300002)(76116006)(55016002)(9686003)(83380400001)(71200400001)(4326008)(2906002)(26005)(53546011)(86362001)(54906003)(7696005)(478600001)(107886003)(6506007)(6636002)(186003)(316002)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: w+X5pyMFNIJD4K21MFGOiXbjWXfCfaqXV17pAbyFt+wQJ9Vhiia1D5dxAtT7Akx5L4if5kSCZiQ8dCpkQ0fFgu0OvBnta9h+aZP1UoJMqdBQ/jO3SkBgGn//ItJHDEJFIKG+GqjhusSCAZW7IqBzy5S8mPP6c7/jBQ1qXCJYxRob2/l7EhUyGHmTub8JmpyQgOIAwkWbdn3GzZx5jBsVRWgMEhcuxF0Pg2FhBxwtiylvnFvWmLeXraN0nnLk3WVgrmtKXW+DiU7OursHE8p6SC+QtdWFxn6KD6N1FMIWlwDtqTs7X6Cum8640eOYGdJy3bh54BsTCwL/KaVQRsCCSCLY+zSVEJeuKS5vzWsbAHoV4JVATfhGyF/pfYWo4p/YndzK42blnpyySxgBElVqZJrWZAslraX3bO63fmC6RgbPMP9wDA7aXQlPTcVEjlZzNp+ss+5uhuOeZCTwyFpq5IpTsDGb+bAg7R2+M1GoGjU= 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: MWHPR1101MB2254.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c85cfc47-b52a-4d15-d3ff-08d829618472 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2020 08:23:28.2020 (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: aoWbCPs8sTi85L8xgQa+1kH9p8A/uBlT6EPl+SiZixGcxP5p5Ubstz42ve4b7CFpHMuCqvrgiLNmU3At14VTOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1758 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1] vhost: set zmbufs to NULL when freed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Tested-by: Xiao Qimai Regards, Xiao Qimai > -----Original Message----- > From: dev On Behalf Of patrick.fu@intel.com > Sent: Wednesday, July 15, 2020 11:59 PM > To: dev@dpdk.org; maxime.coquelin@redhat.com; Xia, Chenbo > > Cc: Wang, Yinan ; Fu, Patrick > Subject: [dpdk-dev] [PATCH v1] vhost: set zmbufs to NULL when freed >=20 > From: Patrick Fu >=20 > zmbufs should be set to NULL when getting freed to avoid double free on > the same buffer pointer >=20 > Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") >=20 > Signed-off-by: Patrick Fu > --- > lib/librte_vhost/vhost_user.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.= c > index df0db8a07..9ddeae362 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -1934,6 +1934,7 @@ free_zmbufs(struct vhost_virtqueue *vq) > drain_zmbuf_list(vq); >=20 > rte_free(vq->zmbufs); > + vq->zmbufs =3D NULL; > } >=20 > /* > -- > 2.17.1