Commit 795a8371 authored by Eric W. Biederman's avatar Eric W. Biederman

signal/arm/kvm: Use send_sig_mceerr

This simplifies the code making it clearer what is going on, and
making the siginfo generation easier to maintain.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent b0594548
...@@ -1450,20 +1450,14 @@ static void invalidate_icache_guest_page(kvm_pfn_t pfn, unsigned long size) ...@@ -1450,20 +1450,14 @@ static void invalidate_icache_guest_page(kvm_pfn_t pfn, unsigned long size)
static void kvm_send_hwpoison_signal(unsigned long address, static void kvm_send_hwpoison_signal(unsigned long address,
struct vm_area_struct *vma) struct vm_area_struct *vma)
{ {
siginfo_t info; short lsb;
clear_siginfo(&info);
info.si_signo = SIGBUS;
info.si_errno = 0;
info.si_code = BUS_MCEERR_AR;
info.si_addr = (void __user *)address;
if (is_vm_hugetlb_page(vma)) if (is_vm_hugetlb_page(vma))
info.si_addr_lsb = huge_page_shift(hstate_vma(vma)); lsb = huge_page_shift(hstate_vma(vma));
else else
info.si_addr_lsb = PAGE_SHIFT; lsb = PAGE_SHIFT;
send_sig_info(SIGBUS, &info, current); send_sig_mceerr(BUS_MCEERR_AR, (void __user *)address, lsb, current);
} }
static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment