Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1709449rwr; Fri, 5 May 2023 20:05:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ511M0vKnpzzFDCt7JdaO2Kk+mxltzCWIKzg7qTgHrb1xTuDbWCVxvDQ9eNBNC+XeNyN/GT X-Received: by 2002:a05:6a20:12c6:b0:f3:47b4:861b with SMTP id v6-20020a056a2012c600b000f347b4861bmr4695857pzg.17.1683342348186; Fri, 05 May 2023 20:05:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683342348; cv=pass; d=google.com; s=arc-20160816; b=ufflHWSIHU0fRVMhn7qTdk8r1R659rqmwXd/KAeFv/xdgS86xVQPh5xzzx4b354fVq LAfUTqWirg8ePsRHyYnJMVWfPlW3ZwGiHI+xkko/PB5dYlqXDExeXY9UTj22h6zQSye0 cDxNDRm+ZXM82pB+BaLXDi3FkM2sjQoFW2sKU1nJkUGImSh7R+b8H+/l5Ehp6bfD4ttA rTXR4yEWJ+6qj29yGWK8vf0bSVpwN+AP9Zd7bXygifmD7yNjMwJILJyopGQ622YJxmVj /3/gVIQJpXCoKdUfZNssUU1W3qNHDTe6XRtOSjJNXDOQ3s05vU5P5f89Zh0T1Z6PAcbn 6G3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=bw8YwDQbK6EBQtlfVTKDb+ykjELcRRk7vjZkuCR+WPM=; b=P/k86kSTDlU08p8q9BO6USRd+bRbdwRqTGJX+bkzYWcY1yXb8UwgjRSmMge5+nEQaW 1HHyA2oUuXusVsTEo7/l9tSMZzKgXw5RDYk+e/tlPBdc+Ulr7YKDS/tRG8BjUPa3Hupu Ugg27N34RZq//LtdO2YersohflbWdC2RlSnCIo3rGwII0UR0msqGbPGwMn/oyR+5buiy u36DmARNYbkCn6bEIjB0zNgDPOupyDykRPZ+1Sxm+zbHGverARLS9aSQwn2SK3paAXw+ HALoGDTInYDTjL54VhuXcSs19g/vqs6A5yky8K2UcLAwUnKi2kiSsovMqzfpnThmMqpa S0Yg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b="KkQ7H+/I"; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a056a00008700b0063af5d600cfsi3515046pfj.302.2023.05.05.20.05.33; Fri, 05 May 2023 20:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b="KkQ7H+/I"; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231393AbjEFCiJ (ORCPT + 99 others); Fri, 5 May 2023 22:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbjEFCiI (ORCPT ); Fri, 5 May 2023 22:38:08 -0400 Received: from BN3PR00CU001.outbound.protection.outlook.com (mail-eastus2azon11020017.outbound.protection.outlook.com [52.101.56.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F23B1FC4; Fri, 5 May 2023 19:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GnZMtCF5uHL0bz5wGbRRL6ArPHTcOPSM46JovwvnRgb51bnzCkWcSUj1wC3JMoNpdvqqNjym+ATko8fw3mLUQ8RBEhaK9E81YOr3zY3r122voLsC9R9MCoiBp7aoW4zwEbGOXeZaNd2dHOBnKwqX9PTkZaJmWCg7bLOQaJ4JLtvTqPJGAEUCPNiarewbCMb2JGHNmD+aiCK5p05Fa8B8DIC0rhCsEGnPffknDVUbz56swkdiLOrfRbGpA2kJaQzO4dbOGn8y8rIRWqP30XrxzyIzc1tL2oZ0FWLtxG744NSausyxsHoBGXV1VcUlwGAOkRWDF0vhOtF8iqt07OwCRA== 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=bw8YwDQbK6EBQtlfVTKDb+ykjELcRRk7vjZkuCR+WPM=; b=VwgRGTMxU+gt6Q3PoCKHWp7rIsFBu9zyaSDdzVYFTNHnxH31gtQ5yZIE7ley3qG664810mPZePPXhfStqq9uLhaJj45Wr92xx+5h2Kv5UDomHCm1Tir6j0nv4vx+L+sqjYta1d5JBlY4SasU93I/kK9iNodIp7h76sLAuXklNmjjod2ZQlspskiHBAs0PMajpKLlLpRlLr9m6XMd5k0AzeEgDPFzdXSE1j+69jDcqEE7IFUsha27atd+sC25c28u2Go4CvdWFFPGgvvqlxN1DJLWllZnIcOExgDxyE7UNxanVMrnIT1rhT0yMiLXu7TVVjII/brVY9FynhutlllX4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bw8YwDQbK6EBQtlfVTKDb+ykjELcRRk7vjZkuCR+WPM=; b=KkQ7H+/IyqP/GNMt7VbhYqLgKMMsXwAtyJe++dV2e8sSnvFboaniAl2Ctq66Gn02IQPM+9arYSAmPIESeq6RVYcgXnSDlnQiAx+mcNuc/DHHrW9nfqWOcGzpvNPo2+wVEsUm8RTZftfq1kjOO7s6JanGVWUJZrBzR6xx8l+0/sQ= Received: from SA1PR21MB1335.namprd21.prod.outlook.com (2603:10b6:806:1f2::11) by DM4PR21MB3394.namprd21.prod.outlook.com (2603:10b6:8:6e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.7; Sat, 6 May 2023 02:38:04 +0000 Received: from SA1PR21MB1335.namprd21.prod.outlook.com ([fe80::c454:256a:ce51:e983]) by SA1PR21MB1335.namprd21.prod.outlook.com ([fe80::c454:256a:ce51:e983%4]) with mapi id 15.20.6387.012; Sat, 6 May 2023 02:38:04 +0000 From: Dexuan Cui To: "Michael Kelley (LINUX)" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , "linux-hyperv@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , "stable@kernel.org" Subject: RE: [PATCH] Drivers: hv: vmbus: Call hv_synic_free() if hv_synic_alloc() fails Thread-Topic: [PATCH] Drivers: hv: vmbus: Call hv_synic_free() if hv_synic_alloc() fails Thread-Index: AQHZftmyZlo283HZ4EioKMxfwa3sj69MY/9QgAAk5cA= Date: Sat, 6 May 2023 02:38:04 +0000 Message-ID: References: <20230504224155.10484-1-decui@microsoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=07820dd1-dce5-498b-ae13-f4f0ea1ee9f5;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-05-06T00:22:32Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA1PR21MB1335:EE_|DM4PR21MB3394:EE_ x-ms-office365-filtering-correlation-id: 74a1237e-4d7a-477d-bce5-08db4ddaeafc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Hmo6sV2ebCL9aU6Bi5ip6ImbGbgBmzJpcE9ZoBMTUiqeWjc+6r5Lwi24lDQF/txK7evLSC1HyVnVlpU7ylKkXADq5hJWwwVi/x7gCCkUsAQEXGXd52WzZGsYsLU6t6kp8e1Nk6cfqmBs9JnqFbR7DSwlKNbmzWwrGCRoDqyyedZp5jyF3eWxnmlkhAq/nd4w+SnNlz8qAhnev5lUu9D72KoFUYlMjMddxJDaxDJ9wNo9QSy2Y2GqUf1tRSteQicVKolWgA5vFIhYTyLNtxwUgENuY98mopKA8n4jKY49H9rSY8yrW4q4owSj+UCZnuut8EwYndazdiTANQ11maibY8o7Ei0bd+MuBe25FOb9N7rztEvglMcqUT6qfC7U2Ut0dfFhrBbyN+G3bt/QhnqvZjsZQPUkHg2et6rTWd7XWz0ZPsZgm8vf8JmGoDxim39vmQlzbk4BUAMEZ7EGDaD1RlFJd1hzHP6mqvpkU+7WoGy8fwrBkRFOSQKb2lHF8d02p7W72ixKSjNfzXP2HLUNAh5Gd4wdVJ0Lxf3W27Z4KuoHqBJ6x9z1lk4dQTIjR8WO6EGPbA+IvcGlk40lR6VVrGktyMdPcAD0dL7S5wt5cEkrqSrd2et4TpcsDGOSychqUwQz6TiItKoZ2JnicKBqaVFtIF20eOcUwNSeKpD8PT8= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR21MB1335.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(346002)(39860400002)(376002)(396003)(451199021)(38100700002)(2906002)(52536014)(41300700001)(122000001)(8936002)(8676002)(38070700005)(5660300002)(8990500004)(33656002)(86362001)(71200400001)(55016003)(54906003)(66946007)(478600001)(83380400001)(26005)(6506007)(186003)(9686003)(7696005)(66476007)(82950400001)(64756008)(66446008)(316002)(110136005)(786003)(10290500003)(66556008)(82960400001)(76116006)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?lvOhq78g269SjhWDSPezqHj+pGDkFrJ0oaVLS7RFyvhcmdDjRexGGf2Q872w?= =?us-ascii?Q?MBh9eqN0l48CHnLEnUQ4bLCvcZ97MelSm/jjlz5yFjWbjBAiaCcz2WZXDCxl?= =?us-ascii?Q?2GdmRwZkAQdL3VfnLONYAg5Hh0yFp6zb7uTjghy1cnV0DUz4cSJlY6VgMWjL?= =?us-ascii?Q?VcbEaFr0KzdJQtR4BtMzNMOD1Pjpc1q0ELl16xAfS0/V1y4M3NAoq88QPB1s?= =?us-ascii?Q?csqmczI4JmaSOW9fRGKFfhv5iJfbfAGaquJAaAAFJIDDzbCZ13zK52BzJiqn?= =?us-ascii?Q?LpimbJf877L6ShWKaKyP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fj04VcqbNmqJ?= =?us-ascii?Q?x5pDqKvwRnOdkvNWApNWpkPrPgT32VO7Lzf/92pqV3VB/n6SWhc2iVkSKkqp?= =?us-ascii?Q?vihs8nrf2vvOVfFxTmwdwPn2pOWUOYvHWF7SQ9BqHgCGxPzBPlEE35JgXvVL?= =?us-ascii?Q?PaFxE6vFWzZS4+RS5YvBGCuZUAdbt2FbMc/NFB0gOmgk6JHf/mI1ZewO+0LL?= =?us-ascii?Q?7FR3Tr1k2ewjX8tSt0VOkCsySf5yjiL16KIybpVAJBLBO7mjPI8w76jKfAV9?= =?us-ascii?Q?p9x8YOujjMTVvqlqnjT4xo2DqHPF490Og4DbV1exYLz018D21KC+7l+XtPMq?= =?us-ascii?Q?/vtAi/armbUKkC/eRgIpgjnPO/RHKz8sou+C2Et3ItF2gEfZNMRxBbOCezC1?= =?us-ascii?Q?1Qqg6yp3VuPywY6iI+7UwSzFnrscKXzGNgqAlBL/?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR21MB1335.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74a1237e-4d7a-477d-bce5-08db4ddaeafc X-MS-Exchange-CrossTenant-originalarrivaltime: 06 May 2023 02:38:04.3478 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Nf+kfV93r9CF/+0UT0lHF9cKGeh0xyPB4bVA1wtKuVPMP/4os3//7OXTF1alC2uYxKdxti/AwuvXov0SBov2jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR21MB3394 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Michael Kelley (LINUX) > Sent: Friday, May 5, 2023 5:30 PM > ... > From: Dexuan Cui Sent: Thursday, May 4, 2023 3:42 > PM > > > > Commit 572086325ce9 ("Drivers: hv: vmbus: Cleanup synic memory free > > path") > > says "Any memory allocations that succeeded will be freed when the call= er > > cleans up by calling hv_synic_free()", but if the get_zeroed_page() in > > hv_synic_alloc() fails, currently hv_synic_free() is not really called > > in vmbus_bus_init(), consequently there will be a memory lead, e.g. >=20 > s/lead/leak/ Sorry for the typo. Wei, can you please help fix this? =20 > > hv_context.hv_numa_map is not freed in the error path. Fix this by > > updating the goto lables. >=20 > s/lables/labels/ Ditto. =20 > The statement in commit 572086325ce9 was true at the time of that > commit. But I broke things in commit 4df4cb9e99f8. Should add a > "Fixes:" tag for 4df4cb9e99f8. I suppose Wei can help add the line: Fixes: 4df4cb9e99f8 ("x86/hyperv: Initialize clockevents earlier in CPU onl= ining") > Nits notwithstanding, >=20 > Reviewed-by: Michael Kelley Thanks!