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)
2346
2346
free_hyp_pgds ();
2347
2347
for_each_possible_cpu (cpu ) {
2348
2348
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 ;
2350
2352
2351
2353
if (free_sve ) {
2352
2354
struct cpu_sve_state * sve_state ;
2353
2355
2354
2356
sve_state = per_cpu_ptr_nvhe_sym (kvm_host_data , cpu )-> sve_state ;
2355
2357
free_pages ((unsigned long ) sve_state , pkvm_host_sve_state_order ());
2356
2358
}
2359
+
2360
+ free_pages (kvm_nvhe_sym (kvm_arm_hyp_percpu_base )[cpu ], nvhe_percpu_order ());
2361
+
2357
2362
}
2358
2363
}
2359
2364
You can’t perform that action at this time.
0 commit comments