lkml.org 
[lkml]   [2024]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 3/3] x86/hyperv: Make encrypted/decrypted changes safe for load_unaligned_zeropad()
Date
On Fri, 2024-01-05 at 10:30 -0800, mhkelley58@gmail.com wrote:
>   * hv_vtom_set_host_visibility - Set specified memory visible to
> host.
>   *
> @@ -521,7 +547,7 @@ static bool hv_vtom_set_host_visibility(unsigned
> long kbuffer, int pagecount, bo
>  
>         pfn_array = kmalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
>         if (!pfn_array)
> -               return false;
> +               goto err_set_memory_p;
>  

If kmalloc() fails here, and set_memory_p() succeeds below, then
hv_vtom_set_host_visibility() returns true, but skips all the
hv_mark_gpa_visibility() work. Shouldn't it return false?
\
 
 \ /
  Last update: 2024-01-12 01:32    [W:0.092 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site