On 24.09.2024 13:30, oleksii.kuroc...@gmail.com wrote:
> On Tue, 2024-09-24 at 12:49 +0200, Jan Beulich wrote:
>> On 13.09.2024 17:57, Oleksii Kurochko wrote:
>>> +static int pt_next_level(bool alloc_tbl, pte_t **table, unsigned
>>> int offset)
>>> +{
>>> +    pte_t *entry;
>>> +    mfn_t mfn;
>>> +
>>> +    entry = *table + offset;
>>> +
>>> +    if ( !pte_is_valid(*entry) )
>>> +    {
>>> +        if ( !alloc_tbl )
>>> +            return XEN_TABLE_MAP_FAILED;
>>> +
>>> +        if ( create_table(entry) )
>>> +            return XEN_TABLE_MAP_FAILED;
>>
>> You're still losing the -ENOMEM here.
> Agree, I will save the return value of create_table and return it.

That won't work very well, will it? Imo you need a new XEN_TABLE_MAP_NOMEM.
(And then XEN_TABLE_MAP_FAILED may want renaming to e.g. XEN_TABLE_MAP_NONE).

Jan

Reply via email to