From bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 21 Feb 2026 16:37:42 -0800 Subject: Convert 'alloc_obj' family to use the new default GFP_KERNEL argument This was done entirely with mindless brute force, using git grep -l '\ --- virt/kvm/guest_memfd.c | 2 +- virt/kvm/kvm_main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'virt') diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index e73339295a44..017d84a7adf3 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -568,7 +568,7 @@ static int __kvm_gmem_create(struct kvm *kvm, loff_t size, u64 flags) if (fd < 0) return fd; - f = kzalloc_obj(*f, GFP_KERNEL); + f = kzalloc_obj(*f); if (!f) { err = -ENOMEM; goto err_fd; diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b798903540b6..22f8a672e1fd 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -4505,7 +4505,7 @@ static long kvm_vcpu_ioctl(struct file *filp, struct kvm_regs *kvm_regs; r = -ENOMEM; - kvm_regs = kzalloc_obj(struct kvm_regs, GFP_KERNEL); + kvm_regs = kzalloc_obj(struct kvm_regs); if (!kvm_regs) goto out; r = kvm_arch_vcpu_ioctl_get_regs(vcpu, kvm_regs); @@ -4532,7 +4532,7 @@ out_free1: break; } case KVM_GET_SREGS: { - kvm_sregs = kzalloc_obj(struct kvm_sregs, GFP_KERNEL); + kvm_sregs = kzalloc_obj(struct kvm_sregs); r = -ENOMEM; if (!kvm_sregs) goto out; @@ -4624,7 +4624,7 @@ out_free1: break; } case KVM_GET_FPU: { - fpu = kzalloc_obj(struct kvm_fpu, GFP_KERNEL); + fpu = kzalloc_obj(struct kvm_fpu); r = -ENOMEM; if (!fpu) goto out; @@ -6326,7 +6326,7 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm) active = kvm_active_vms; mutex_unlock(&kvm_lock); - env = kzalloc_obj(*env, GFP_KERNEL); + env = kzalloc_obj(*env); if (!env) return; -- cgit v1.2.3