Move mmap_sem releasing in the do_sigbus()'s unique caller : mm_fault_error()
No functional changes.
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
siginfo_t info;
unsigned int lsb = 0;
- up_read(¤t->mm->mmap_sem);
-
if (!user_mode(regs))
return MM_FAULT_ERR(SIGBUS);
return MM_FAULT_RETURN;
}
- if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE))
+ if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) {
+ up_read(¤t->mm->mmap_sem);
return do_sigbus(regs, addr, fault);
+ }
/* We don't understand the fault code, this is fatal */
BUG();