Re: [PATCH] virt: tdx-guest: Fix the decrypted failure memory free

From: Dave Hansen
Date: Thu Jun 13 2024 - 12:07:51 EST


On 6/13/24 04:19, Li RongQing wrote:
> When set_memory_decrypted() fails, the memory should be encrypted
> via set_memory_encrypted(); if encrypting the memory fails, leak it

Please, always cc LKML on this stuff.

Second, Rick was looking in this area, but I'm not sure we ever applied
his patches. The idea was to never leak memory silently in these
failures. Doesn't this silently leak memory?