Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 170bb239 authored by Ruchi Kandoi's avatar Ruchi Kandoi
Browse files

Revert "arm64: kernel: check mode for get_user in undefinstr"

This reverts commit 2bbb3c15.
parent bf1902c8
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
@@ -289,7 +289,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
	/* check for AArch32 breakpoint instructions */
	if (!aarch32_break_handler(regs))
		return;
	if (user_mode(regs)) {
	if (compat_thumb_mode(regs)) {
		if (get_user(instr, (u16 __user *)pc))
			goto die_sig;
@@ -300,13 +299,10 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
			instr <<= 16;
			instr |= instr2;
		}
		} else if (get_user(instr, (u32 __user *)pc)) {

	} else if ((get_user(instr, (u32 __user *)pc))) {
		goto die_sig;
	}
	} else {
		/* kernel mode */
		instr = *((u32 *)pc);
	}

	if (call_undef_hook(regs, instr) == 0)
		return;