Unverified Commit 34a4a473 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!4164 arch/mm/fault: fix major fault accounting when retrying under per-VMA lock

parents 245c31af 3f723161
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -633,6 +633,8 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
		goto done;
	}
	count_vm_vma_lock_event(VMA_LOCK_RETRY);
	if (fault & VM_FAULT_MAJOR)
		mm_flags |= FAULT_FLAG_TRIED;

	/* Quick path to respond to signals */
	if (fault_signal_pending(fault, regs)) {
+2 −0
Original line number Diff line number Diff line
@@ -496,6 +496,8 @@ static int ___do_page_fault(struct pt_regs *regs, unsigned long address,
		goto done;
	}
	count_vm_vma_lock_event(VMA_LOCK_RETRY);
	if (fault & VM_FAULT_MAJOR)
		flags |= FAULT_FLAG_TRIED;

	if (fault_signal_pending(fault, regs))
		return user_mode(regs) ? 0 : SIGBUS;
+2 −0
Original line number Diff line number Diff line
@@ -304,6 +304,8 @@ void handle_page_fault(struct pt_regs *regs)
		goto done;
	}
	count_vm_vma_lock_event(VMA_LOCK_RETRY);
	if (fault & VM_FAULT_MAJOR)
		flags |= FAULT_FLAG_TRIED;

	if (fault_signal_pending(fault, regs)) {
		if (!user_mode(regs))
+3 −0
Original line number Diff line number Diff line
@@ -424,6 +424,9 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
		goto out;
	}
	count_vm_vma_lock_event(VMA_LOCK_RETRY);
	if (fault & VM_FAULT_MAJOR)
		flags |= FAULT_FLAG_TRIED;

	/* Quick path to respond to signals */
	if (fault_signal_pending(fault, regs)) {
		fault = VM_FAULT_SIGNAL;
+2 −0
Original line number Diff line number Diff line
@@ -1370,6 +1370,8 @@ void do_user_addr_fault(struct pt_regs *regs,
		goto done;
	}
	count_vm_vma_lock_event(VMA_LOCK_RETRY);
	if (fault & VM_FAULT_MAJOR)
		flags |= FAULT_FLAG_TRIED;

	/* Quick path to respond to signals */
	if (fault_signal_pending(fault, regs)) {