From: Vasiliy Averin <[email protected]>

struct kvm had increased in RHEL77 and triggeres hugh-order-allocation
warning now.
Let's switch to use kvzalloc to suppress this warning

https://jira.sw.ru/browse/PSBM-97483

Signed-off-by: Vasily Averin <[email protected]>

(cherry picked from commit 40ee5d7e2a8a8c475eee4406186d4fd6ec66c520)
Signed-off-by: Andrey Zhadchenko <[email protected]>

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index fcee0b5..14bdb89 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -914,12 +914,12 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu 
*vcpu,
  */
 static inline struct kvm *kvm_arch_alloc_vm(void)
 {
-       return kzalloc(sizeof(struct kvm), GFP_KERNEL);
+       return kvzalloc(sizeof(struct kvm), GFP_KERNEL);
 }
 
 static inline void kvm_arch_free_vm(struct kvm *kvm)
 {
-       kfree(kvm);
+       kvfree(kvm);
 }
 #endif
 
-- 
1.8.3.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to