From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.72]) by mx.groups.io with SMTP id smtpd.web12.2164.1663728569172197983 for ; Tue, 20 Sep 2022 19:49:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=27MPC+Ji; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.244.72, mailfrom: ying-tsun.huang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OqYmvV0/ZVYYPkrSBcLk9Rx4Y6O1Y2rt7INxgAJC6hu8ljIQzklvGNhpKNb7U5s+p8cGLW5IkKLGptL8pxx55fKaHa+l7pnO3lp50NMo+5wylzWHtxLYjFKCqkx3hOftafUzNPwktzpdreGC+Jdy5V6Css/4jIk4iS+7yyapoaoWo6Q2H04tpzvuM4aEQu48DfF4UgEYtsefOFw6sy62I006LIcwSP8u+zBNgKX/1ZZ0NOMx5hTr5q+yGsIAci1OC7pKyZ+wJFmaJm6SZTH4FC1y9VbrF95VjKggiWLxFR6ikpyxOUfFMg3XwqXPnhXlVKw0gpl0Q2DbxOPRUmMVbg== 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=TEZMc67xpGHTcABYBNBwlFaJ0j2ZHEwtSSD9DwI61J8=; b=HI0Rpg/DUJlaLhUpH1skOgXjDD7/ao9k732RCoOpGBxZ8nISayVDik4lz/wRjLuYOjbQwMajyHD+9W4pvw9WkMpUgzOrmBMzWco+MPm6E7HSKuGWN6eB34nD2oRUb+vtvNUXCF5Z4JTNpoF4oX7Mo45dIGco4uC2T/sRSW+JOcqYPSo1NUKvODNQnj/vSJtJxtOWqVVn34i0/hBndSWYV72XifW0lqf26pX5QIpGT1Ci8Y0/tHuyzd+fsRt0kBLSNSNJzhaK2WPpnQ54ozV0kv3JnboS+3fdUo8X8PV7E0W/q2Wo0o5dbcdSbYo7hspRtSl/MNMgf+00qGaDmI3lAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TEZMc67xpGHTcABYBNBwlFaJ0j2ZHEwtSSD9DwI61J8=; b=27MPC+JinqQvo+vQEqWXnq/vkiBCAhGlNdeVbHfnEK64NTP9oPUdBi5IJajjq6bMut0L+4q+SzhCP99Y+eP3j5wMlkyhRnm1r2ZwhL4xQikzA1tUey15xn9PejccfVbwtT3olZitcPBx+46wy9V6+kKEz3/H6cNwYWwZ/GdzMDs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN9PR12MB5305.namprd12.prod.outlook.com (2603:10b6:408:102::5) by PH0PR12MB5677.namprd12.prod.outlook.com (2603:10b6:510:14d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Wed, 21 Sep 2022 02:49:26 +0000 Received: from BN9PR12MB5305.namprd12.prod.outlook.com ([fe80::2d3d:180b:df02:3433]) by BN9PR12MB5305.namprd12.prod.outlook.com ([fe80::2d3d:180b:df02:3433%7]) with mapi id 15.20.5632.021; Wed, 21 Sep 2022 02:49:26 +0000 From: ying-tsun.huang@amd.com To: devel@edk2.groups.io Subject: [PATCH v1 0/1] MdeModulePkg/Core: Fix the potential hang of calling SetTimer. Date: Wed, 21 Sep 2022 10:48:59 +0800 Message-ID: <20220921024900.4179-1-ying-tsun.huang@amd.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2PR01CA0033.apcprd01.prod.exchangelabs.com (2603:1096:4:192::23) To BN9PR12MB5305.namprd12.prod.outlook.com (2603:10b6:408:102::5) Return-Path: Ying-Tsun.Huang@amd.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN9PR12MB5305:EE_|PH0PR12MB5677:EE_ X-MS-Office365-Filtering-Correlation-Id: 89829734-b0b5-4378-8e91-08da9b7be541 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0Tu2B1vdiAg2d+uyHH/z8llMatxim5jymdaTvqNJWBpnTudw8w6ypTpaP5TBkXAeh0xOsT/Kod17PLpOKh1c5+G/0FOfXUcpROiawEycHuZTCYkIACnT/cP91RjOszlAJSMj2A5TzY3c7nVM7xvYOOkJsLa9AC4g+EggdAvBZ4An21nMXjgvO/EFSs+Pqce3W2dmFUOSUza269qnvVfLjU/IdgVatkZTkFCKfWLPNv+gpu21gsH4KxWdJwHh9C5J4On+pgeOWoOQHYiY7x0emOvCF/hu0TEe1NZPP4rj6mvzjZNqHeDGU+w71o3zYeG+Nfwb+edEeasxIe50jKITWJg1nxXEOwGBiMq98bPEE7YlOCskPOWZ60MXjXRUkDco8oUcDjXKIMNF5KKAVQdvuO0tzx5QUTl4AYnPHo+pMjHCp4q2QhThVtDjohhcfWWeNPbnLcrGawzxEvEBCRSjWeJpQU8nBeGRkoDaM6hNJE8EckTDkTxDG5e/IXCjMvirijVNNVDY6ItOmsAFTnTq48Pg3wbMJDxBp4vM9EVzB1BhtH91O3Hjasdxx/oCfNpHkt3itPOfmz+snozfXiqz4Aq9k+I7UY/7PBbix31TC9fTqbawUucRnF9azsorp2JBlTKKLv5nAugNhvMGR3Kl121SB3yYFL8FfjFRcPOLCedPAdF3+DGEdzwNs9q8xcpEacZIqwNuIHSM4OutTpQcKIyKpuxqBp1sP6lENfUiJ41nN8JQrUIICpXlAycLXrW+4YDw+RR91syJLcHDj8KTXQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR12MB5305.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(366004)(136003)(396003)(39860400002)(376002)(451199015)(41300700001)(38350700002)(38100700002)(478600001)(2906002)(8676002)(6666004)(316002)(86362001)(6916009)(6506007)(6486002)(26005)(6512007)(83380400001)(52116002)(8936002)(5660300002)(36756003)(66476007)(4744005)(186003)(2616005)(1076003)(66556008)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?N1fpsYejdBdiYqfsxIKQVB7YjfHI0/H3QGHC96xx9Jzeoqxm3fuUFiazamyt?= =?us-ascii?Q?ah1r1uzx2cXUKd0kC3rDTP+8DuUQ1bkVyaBv1fkvnNcyZhVLpA4NoDpVxZqj?= =?us-ascii?Q?HN4jAxEjWOt7AVsfYUh00mRDyXyraOtRoayKeGlU/p5XB8413L9fw2fQzVjz?= =?us-ascii?Q?tc9pGN4PlUk9+D/4/m3HRvlqsMe57AyvhE9hRQ4OFyuq9DllfMtj1+QGViKY?= =?us-ascii?Q?3GJb6R5p28PLyiqxp/+WqleM/AAPhS740VTEeeBUKctjM+Vcqk1pasPSPoIj?= =?us-ascii?Q?C3t6BjN6Oppbnmxd/rET8Cf31UAcbWeKvV4BiLKiH/wQvN6hg1wu71ACCm5w?= =?us-ascii?Q?bEYhlV66KnDtc6FDh4i4WC4w2H10WW9UlrLqNcG9k9RM99D8V/wMLctlAnv1?= =?us-ascii?Q?V7UFUyXgvFn/1nNuSr6TerNSFWGiKoY316ju7SU6nTn2+6MC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2t/r1DCPOUcZbXIVKXB4WmHoB9uH?= =?us-ascii?Q?CLHf7VI9obGguMy2Jp1+3Mhfv79rTyznabp9ZmiTNsNF25VvXs0UhlDgFIW2?= =?us-ascii?Q?tLHlkNpZatsDFYEh+gJeS99YrrszcaChblQnp4ySs2qVIEn+2F+kgUXHYhLZ?= =?us-ascii?Q?/nqIoG2Ne1F2FkWq6Ik/agRVp2tmGJt6+L8mUj4B0sz2sv9Kxmd/Q88Ww8lZ?= =?us-ascii?Q?QaXCmvIeAMJOUh17D9PV6JCipJKf5bXJ/qd45ubL?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89829734-b0b5-4378-8e91-08da9b7be541 X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5305.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2022 02:49:25.9826 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QV3k+DerG5e6QrDnlq12+wl0D2olMDs7HlMDgEGE0lMA0zj+mGERTdf+FgK4z2ijadZ1qOavNpDMVD+CAGybxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5677 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain When calling SetTimer with Type is not TimerCancel and TriggerTime is 0, gTimer is used to get the timer period. However, gTimer is NULL before EFI_TIMER_ARCH_PROTOCOL is installed. Adding the check of gTimer and return EFI_NOT_READY to avoid the hang. Ying-Tsun Huang (1): MdeModulePkg/Core: Fix the potential hang of calling SetTimer. MdeModulePkg/Core/Dxe/DxeMain.h | 2 ++ MdeModulePkg/Core/Dxe/Event/Timer.c | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) --=20 2.25.1