[PATCH] KVM: arm/arm64: vgic-its: Add error handling in vgic_its_cache_translation
Keisuke Nishimura
keisuke.nishimura at inria.fr
Fri Nov 29 08:59:40 PST 2024
On 29/11/2024 17:33, Oliver Upton wrote:
> On Fri, Nov 29, 2024 at 12:30:52PM +0100, Keisuke Nishimura wrote:
>> On 29/11/2024 08:20, Oliver Upton wrote:
>>> - Store fails because of a failed memory allocation / error in xarray
>>> library.
>>>
>>> We don't handle #3, and the correct thing to do in this case is to put
>>> @irq since it was never made visible in the translation cache.
>>>
>>> So I think we'd want to do something similar to the following.
>>>
>>
>> Hello,
>>
>> Thanks for the comment. xa_reserve() can allocate the memory in advance and
>> ensure the success of the subsequent xa_store().
>
> Yes, but xa_store() can fail for other reasons than a failed memory
> allocation. Which is why I recommended adding an explicit error handling
> path to cover *all* failures to store in the xarray.
>
Okay. Then, in the next version, I will send the change you suggested in the
previous mail:)
thanks,
Keisuke
More information about the linux-arm-kernel
mailing list