Source-Changes-HG archive

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

[src/trunk]: src/lib/libnvmm Fix the segmentation check, the limit is relativ...



details:   https://anonhg.NetBSD.org/src/rev/33a144a7466b
branches:  trunk
changeset: 837994:33a144a7466b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Dec 29 17:54:54 2018 +0000

description:
Fix the segmentation check, the limit is relative, not absolute.

diffstat:

 lib/libnvmm/libnvmm_x86.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 1ae6f2c46cac -r 33a144a7466b lib/libnvmm/libnvmm_x86.c
--- a/lib/libnvmm/libnvmm_x86.c Sat Dec 29 16:27:12 2018 +0000
+++ b/lib/libnvmm/libnvmm_x86.c Sat Dec 29 17:54:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: libnvmm_x86.c,v 1.6 2018/12/27 07:22:31 maxv Exp $     */
+/*     $NetBSD: libnvmm_x86.c,v 1.7 2018/12/29 17:54:54 maxv Exp $     */
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -472,7 +472,7 @@
                limit *= PAGE_SIZE;
        }
 
-       if (__predict_false(*gva + seg->base + size > limit)) {
+       if (__predict_false(*gva + size > limit)) {
                goto error;
        }
 



Home | Main Index | Thread Index | Old Index