Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/uvm Pull up following revision(s) (requested by maxv ...



details:   https://anonhg.NetBSD.org/src/rev/5b8308e2b511
branches:  netbsd-8
changeset: 453767:5b8308e2b511
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Aug 11 10:01:14 2019 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1332):

        sys/uvm/uvm_mmap.c: revision 1.173

Change 'npgs' from int to size_t. Otherwise the 64bit->32bit conversion
could lead to npgs=0, which is not expected. It later triggers a panic
in uvm_vsunlock().

Found by TriforceAFL (Akul Pillai).

diffstat:

 sys/uvm/uvm_mmap.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 5310a3da1ce2 -r 5b8308e2b511 sys/uvm/uvm_mmap.c
--- a/sys/uvm/uvm_mmap.c        Fri Aug 09 19:22:51 2019 +0000
+++ b/sys/uvm/uvm_mmap.c        Sun Aug 11 10:01:14 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_mmap.c,v 1.166.2.1 2017/11/02 21:39:18 snj Exp $   */
+/*     $NetBSD: uvm_mmap.c,v 1.166.2.2 2019/08/11 10:01:14 martin Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.166.2.1 2017/11/02 21:39:18 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.166.2.2 2019/08/11 10:01:14 martin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_pax.h"
@@ -146,7 +146,8 @@
        vaddr_t start, end, lim;
        struct vm_map *map;
        vsize_t len;
-       int error = 0, npgs;
+       int error = 0;
+       size_t npgs;
 
        map = &p->p_vmspace->vm_map;
 



Home | Main Index | Thread Index | Old Index