diff options
author | Vipin K Parashar <vipin@linux.vnet.ibm.com> | 2017-02-16 22:40:26 +0530 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-02-17 14:03:35 +1100 |
commit | 4da934dc6515afaa1db4e02548803de0cd279734 (patch) | |
tree | c1a2edb331581b6d609722cbfd113cbed432a91d /arch/powerpc/kvm/book3s_32_mmu.c | |
parent | 5b73d6347eb82cd2a26698fc339607e25e0ad917 (diff) | |
download | linux-4da934dc6515afaa1db4e02548803de0cd279734.tar.bz2 |
KVM: PPC: Book3S PR: Ratelimit copy data failure error messages
kvm_ppc_mmu_book3s_32/64 xlat() logs "KVM can't copy data" error
upon failing to copy user data to kernel space. This floods kernel
log once such fails occur in short time period. Ratelimit this
error to avoid flooding kernel logs upon copy data failures.
Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm/book3s_32_mmu.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_32_mmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_32_mmu.c b/arch/powerpc/kvm/book3s_32_mmu.c index a2eb6d354a57..1992676c7a94 100644 --- a/arch/powerpc/kvm/book3s_32_mmu.c +++ b/arch/powerpc/kvm/book3s_32_mmu.c @@ -224,7 +224,8 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr, ptem = kvmppc_mmu_book3s_32_get_ptem(sre, eaddr, primary); if(copy_from_user(pteg, (void __user *)ptegp, sizeof(pteg))) { - printk(KERN_ERR "KVM: Can't copy data from 0x%lx!\n", ptegp); + printk_ratelimited(KERN_ERR + "KVM: Can't copy data from 0x%lx!\n", ptegp); goto no_page_found; } |