Message ID | 1457483454-30115-145-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index feda8ca..0b0382a 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c @@ -142,7 +142,7 @@ static int get_reg_offset(struct insn *insn, struct pt_regs *regs, break; } - if (regno > nr_registers) { + if (regno >= nr_registers) { WARN_ONCE(1, "decoded an instruction with an invalid register"); return -EINVAL; }