Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Fix the check, should be >=.



details:   https://anonhg.NetBSD.org/src/rev/a43dd1cf3e58
branches:  trunk
changeset: 831547:a43dd1cf3e58
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Apr 05 14:11:20 2018 +0000

description:
Fix the check, should be >=.

diffstat:

 sys/arch/x86/x86/dbregs.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 2e705d547d29 -r a43dd1cf3e58 sys/arch/x86/x86/dbregs.c
--- a/sys/arch/x86/x86/dbregs.c Thu Apr 05 11:07:00 2018 +0000
+++ b/sys/arch/x86/x86/dbregs.c Thu Apr 05 14:11:20 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dbregs.c,v 1.6 2017/02/23 12:01:12 martin Exp $        */
+/*     $NetBSD: dbregs.c,v 1.7 2018/04/05 14:11:20 maxv Exp $  */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -188,7 +188,7 @@
 
        /* Check that DR0-DR3 contain user-space address */
        for (i = 0; i < X86_DBREGS; i++)
-               if (regs->dr[i] > (vaddr_t)VM_MAXUSER_ADDRESS)
+               if (regs->dr[i] >= (vaddr_t)VM_MAXUSER_ADDRESS)
                        return EINVAL;
 
        /*



Home | Main Index | Thread Index | Old Index