From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.60]) by mx.groups.io with SMTP id smtpd.web11.5865.1687913754734682160 for ; Tue, 27 Jun 2023 17:55:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=HK97amIk; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.243.60, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TKPSwoUVw+rzRMq6b4MkKc0QKBC39erv5WafloWV7TcwakVUjJk0Wx6Pltyo6v4aaQW3l6WA+nD1ppDshxpef2RtQU2C5u7ogh/agQLnOnUY/LbUFrkLyr+8FFTnqUQ/+d+6fVUp/MbKpDjGW0POlFJTJ9BSX1gcj/bgqcgYDkQJtCQEUgXg1xC7vnMxvg1Pf8sRExnbK4Ri3MmO/PsS3OPvw4m6+ZLKGngoMibSJCPpBl9aVCQTiGhStIt/XeTuF37worADzJLLWi1v4txsUBIKoV3R0YZ4oQnXzl1sKSXz/mEHOBQWOXTQUcG6pl4SWEQJoinoNxV/SQKSmx1c+Q== 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=ptKPyuIMsV0MvOHFH5zNOEl98MJT6Rx076Oxq5r+YuE=; b=PGyLEg6IJa6ZrWnKj6LoiBHh589fIOqQ10VnMqnIcI1T8F0ymCPDUpqHV36OzcRN57RgKxwRwOABp8qLmK2PPxgP5vIaAdjFeH50bgdovII4hIowpn2/wCJ4jlvA1IO9waVDbQ027O6yzeAqyqFXjOTQiOINTuy6ROrpjoQ7XhuwBwhCdcRA6OQbdQw4bmBEGe5pJbjmj0RonaN/W1dcyQFla3gHlaXN5Z4VotERJHY/hhbBW6jcheYFd8QIFSuGRF6IfpU58Uwny81zl5LsoXctHakQQxvyZOaDQ1wjv3yexVSimFiNPGyIwWp5ehqTsqwpi/v8HPunXO0giwKoFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ptKPyuIMsV0MvOHFH5zNOEl98MJT6Rx076Oxq5r+YuE=; b=HK97amIkZbM9cyKopKC48XEbTsVKtEO8jvdGP5B/3qAy5S7olAao2Jn8A712FCi6NIv5tokfr91+30d8q9h2t6Xx0Y77M4RrCimzK/KUCHF8vmAD67Lh0+28yar0/FW7U98aWgkXN1tOU0Kvuq0zBLS5jEEySDokxmYPdhO7Z9CB5Vzz2xwzszmcC1OtcWGgTZnXCXmP0iVIN+A8j9+vs5GYPMdCufYgchi9FrNlGzHhR9899LNzDz/FK+l3lMhwluVx83+QGP6GluKjmUg1RxWlaVCgayFdayFSFVlqSwOjWXio5xnC+4v/Aax3aoq/ppvKbZ3sae7/AoCLHOJp8g== Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by CH2PR12MB4166.namprd12.prod.outlook.com (2603:10b6:610:78::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Wed, 28 Jun 2023 00:55:52 +0000 Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::820f:3158:c86f:9bca]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::820f:3158:c86f:9bca%7]) with mapi id 15.20.6500.026; Wed, 28 Jun 2023 00:55:51 +0000 From: "Nickle Wang" To: "devel@edk2.groups.io" , Nickle Wang CC: Maciej Rabeda , Siyuan Fu , Abner Chang , Igor Kulchytskyy , Nick Ramirez Subject: Re: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding start issue. Thread-Topic: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding start issue. Thread-Index: AQHZPUwAuV9WkswkYkek1DFyHKnaxa+gO4QQ Date: Wed, 28 Jun 2023 00:55:51 +0000 Message-ID: References: <174276A45CE2816B.5513@groups.io> In-Reply-To: <174276A45CE2816B.5513@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|CH2PR12MB4166:EE_ x-ms-office365-filtering-correlation-id: d5657a07-aa44-45f8-1474-08db77726ba8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jLsS0MN2n2tN6YKNDqZ0WYvDCkxGqj+tRCiMOogIk2702WYnHvgCiE7OaLXH3tUrd4gbXK0tpmZ4eB7/89/4UEsWBaobCxM0g3CBMHCht8YZPGPgocVXwnm8CeARbmZDmUvAzPHxvz+x8YywrN6JUNC7E0ajJsVJrl5a+OPLcviOaySooWCjv0yldP6srgl0ao2P5MvEgNeuZsxparcrP7z1FPGca8JnCek+IQnFqMftDlA/XA13XOF9nYMmD9lyX5R7ZcblLVRKhundIlSpIIRSvdtziH7yurMk1RABRGbg930xAAPMjgcfSb1uac1TmDMu3i2gBZlvy4YkyLJpj/JJqkBNqTRO28CnILVRhEuwnVEJspdzMndC/3mwQAkWwsuFGlc0O9PRaqZuflAhU5vHxr10R5mcUhz7uuMAH9EQV2rEJDBdYvie58W1I2Pi9Ps7mWrJ1fxL1hV8wjmXhKbG8gBkqs6s2J92t26JSDrDZYwocwC+0XlqbaM8XHLyfNJMCYF36aESeUR8IXc+1VoRJ9eJHngXYBJjPRDSAxneE+kz6QQUKb54G5OY0vAHqlkYar9oRFEnKnBcQnFz3+VKhUTIKQbnPq/TN8dJPt1PPOS6Da2W8yHSOnnZ4doN x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR12MB7031.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(39860400002)(366004)(396003)(136003)(451199021)(2906002)(966005)(7696005)(53546011)(9686003)(26005)(83380400001)(38100700002)(71200400001)(107886003)(122000001)(6506007)(186003)(55016003)(41300700001)(54906003)(110136005)(86362001)(4326008)(38070700005)(478600001)(76116006)(66556008)(66946007)(66446008)(33656002)(66476007)(316002)(64756008)(8936002)(8676002)(5660300002)(52536014)(66899021)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VRPfVRVQN6Tg8f9zwVbcBFX1A+oDwByGuInNSqeeTiE8ePx8vPCW8TS1DKo4?= =?us-ascii?Q?WhIgKnHuUYRi3R0cNkRKslPh6oWzVQRKNgA6u+tgJ+6zt3dlXbPDflhEqyPy?= =?us-ascii?Q?t7dWyVmCPCQAWrkHatAgpGzy3G0HfqM0qANuGT+s0IOjrnYXz5m7+abiMY7K?= =?us-ascii?Q?AeIqSGm9mvO6IsmJb9e2waGU0SdD5RwdRuHmGNQYIB2TnJcKsIuyuiXoO3+d?= =?us-ascii?Q?yr06QSFlx+N2jNsGDRbNtZc4Wp8sMsQKmg2/iVmgFT0XJvUCGecnGIup0iff?= =?us-ascii?Q?fDGuAF8HXuFYZuedxFQeZ65AmMwz9FrIzkCqYM9bV0Wa2cbWcTGVIZ08V8CY?= =?us-ascii?Q?3DChyxvM89tIQ7AtMCvmLvyT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?= =?us-ascii?Q?YaIZxVFFoefazlFSJnI41VddifXzPy17aNteXQBR/ZhwUetHEPvgEgCuLp/s?= =?us-ascii?Q?RdMDwevP2xv0EiVdWg7EqUZMUlfzToxvKWY/IDEq7RJlAlC6a4bX6t7519o3?= =?us-ascii?Q?9MkAY6naAY9h2YRhSN8ZnD5b7lkXqYbM/pvI+bSKThfQNn9oP2zrJy6Zz82K?= =?us-ascii?Q?Hsm5eQZA7dB+/RBW6cGNticySLkg/0XBngJGDbjjYeUrfEV2V+64aeBnb3vw?= =?us-ascii?Q?UQWzvmhF0RYQ72CUrwGC8xvnU9m39jtV2yPqAmTi65nd+Om8wlGBTNP8d6kz?= =?us-ascii?Q?UCsmqK+V1XtCirYRSaU=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5657a07-aa44-45f8-1474-08db77726ba8 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2023 00:55:51.8687 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uOB205DEqBtzG9sSmHoql4D9/qm17NsC+QjCkPlFOhFE/zGrHw7YLgMdLsGKVqRSDIx3O/HPvdqRH4AfYe3e2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4166 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable May I know if someone can help to review this patch? Thanks, Nickle > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Nickle Wan= g > via groups.io > Sent: Friday, February 10, 2023 8:34 PM > To: devel@edk2.groups.io > Cc: Maciej Rabeda ; Siyuan Fu > ; Abner Chang ; Igor Kulchytsky= y > ; Nick Ramirez > Subject: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding = start > issue. >=20 > External email: Use caution opening links or attachments >=20 >=20 > When failure happens in HttpDxeStart, the error handling code release the > memory buffer but it does not uninstall HTTP service bindnig protocol. As= the > result, application can still locate this protocol and invoke service bin= ding fucntions > in released memory pool. >=20 > Signed-off-by: Nickle Wang > Cc: Maciej Rabeda > Cc: Siyuan Fu > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > NetworkPkg/HttpDxe/HttpDriver.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) >=20 > diff --git a/NetworkPkg/HttpDxe/HttpDriver.c > b/NetworkPkg/HttpDxe/HttpDriver.c index 5d918d3c4d..f6d1263cad 100644 > --- a/NetworkPkg/HttpDxe/HttpDriver.c > +++ b/NetworkPkg/HttpDxe/HttpDriver.c > @@ -3,6 +3,7 @@ >=20 > Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
> (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserv= ed. >=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -464,8 +465,16 @@ ON_ERROR: >=20 > if (HttpService !=3D NULL) { > HttpCleanService (HttpService, UsingIpv6); > - if ((HttpService->Tcp4ChildHandle =3D=3D NULL) && (HttpService- > >Tcp6ChildHandle =3D=3D NULL)) { > - FreePool (HttpService); > + Status =3D gBS->UninstallMultipleProtocolInterfaces ( > + &ControllerHandle, > + &gEfiHttpServiceBindingProtocolGuid, > + &HttpService->ServiceBinding, > + NULL > + ); > + if (!EFI_ERROR (Status)) { > + if ((HttpService->Tcp4ChildHandle =3D=3D NULL) && (HttpService- > >Tcp6ChildHandle =3D=3D NULL)) { > + FreePool (HttpService); > + } > } > } >=20 > -- > 2.39.1.windows.1 >=20 >=20 >=20 >=20 >=20