]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: avoid useless copy of cpufreq policy
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Feb 2020 09:49:10 +0000 (10:49 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Feb 2020 09:54:50 +0000 (10:54 +0100)
commit0cab7cf8336bc0f1c89b3f657111422dcc363a0f
treeea7bca180557b531b94b6a1a3d81aaca81bd8c89
parentee89fef0a6ac5a83dea14dd51ab3198a9cab25e9
KVM: x86: avoid useless copy of cpufreq policy

struct cpufreq_policy is quite big and it is not a good idea
to allocate one on the stack.  Just use cpufreq_cpu_get and
cpufreq_cpu_put which is even simpler.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c