File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2346,14 +2346,19 @@ static void __init teardown_hyp_mode(void)
23462346 free_hyp_pgds ();
23472347 for_each_possible_cpu (cpu ) {
23482348 free_pages (per_cpu (kvm_arm_hyp_stack_base , cpu ), NVHE_STACK_SHIFT - PAGE_SHIFT );
2349- free_pages (kvm_nvhe_sym (kvm_arm_hyp_percpu_base )[cpu ], nvhe_percpu_order ());
2349+
2350+ if (!kvm_nvhe_sym (kvm_arm_hyp_percpu_base )[cpu ])
2351+ continue ;
23502352
23512353 if (free_sve ) {
23522354 struct cpu_sve_state * sve_state ;
23532355
23542356 sve_state = per_cpu_ptr_nvhe_sym (kvm_host_data , cpu )-> sve_state ;
23552357 free_pages ((unsigned long ) sve_state , pkvm_host_sve_state_order ());
23562358 }
2359+
2360+ free_pages (kvm_nvhe_sym (kvm_arm_hyp_percpu_base )[cpu ], nvhe_percpu_order ());
2361+
23572362 }
23582363}
23592364
You can’t perform that action at this time.
0 commit comments