[edk2-devel] [PATCH EDK2 v2 1/1] OvmfPkg/XenPvBlkDxe: add return value if allocting fail
Laszlo Ersek
lersek at redhat.com
Fri Nov 27 17:57:53 UTC 2020
On 11/24/20 10:19, wenyi,xie via groups.io wrote:
> It's OK to me.
>
> Thanks
> Wenyi
Merged as commit f69a2b9a4202, via
<https://github.com/tianocore/edk2/pull/1151>.
Thanks
Laszlo
> On 2020/11/24 17:16, Laszlo Ersek wrote:
>> On 11/24/20 03:06, Wenyi Xie wrote:
>>> return EFI_OUT_OF_RESOURCES if pool allocating fail.
>>>
>>> Cc: Jordan Justen <jordan.l.justen at intel.com>
>>> Cc: Laszlo Ersek <lersek at redhat.com>
>>> Cc: Ard Biesheuvel <ard.biesheuvel at arm.com>
>>> Cc: Anthony Perard <anthony.perard at citrix.com>
>>> Cc: Julien Grall <julien at xen.org>
>>> Signed-off-by: Wenyi Xie <xiewenyi2 at huawei.com>
>>> ---
>>> OvmfPkg/XenPvBlkDxe/BlockFront.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.c b/OvmfPkg/XenPvBlkDxe/BlockFront.c
>>> index 122a6baed25a..32d70c36cef2 100644
>>> --- a/OvmfPkg/XenPvBlkDxe/BlockFront.c
>>> +++ b/OvmfPkg/XenPvBlkDxe/BlockFront.c
>>> @@ -155,6 +155,10 @@ XenPvBlockFrontInitialization (
>>> ASSERT (NodeName != NULL);
>>>
>>> Dev = AllocateZeroPool (sizeof (XEN_BLOCK_FRONT_DEVICE));
>>> + if (Dev == NULL) {
>>> + return EFI_OUT_OF_RESOURCES;
>>> + }
>>> +
>>> Dev->Signature = XEN_BLOCK_FRONT_SIGNATURE;
>>> Dev->NodeName = NodeName;
>>> Dev->XenBusIo = XenBusIo;
>>>
>>
>> Reviewed-by: Laszlo Ersek <lersek at redhat.com>
>>
>> Unless it's urgent for you, I'd like to merge this after
>> edk2-stable202011. It's a bugfix alright, but the issue seems to have
>> existed for a long time, with presumably no symptoms for most users.
>>
>> Thanks
>> Laszlo
>>
>> .
>>
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68057): https://edk2.groups.io/g/devel/message/68057
Mute This Topic: https://groups.io/mt/78469250/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list