Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Avoid left shift changing the signedness flag



details:   https://anonhg.NetBSD.org/src/rev/dd8d239ce99f
branches:  trunk
changeset: 464401:dd8d239ce99f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Oct 04 22:48:45 2019 +0000

description:
Avoid left shift changing the signedness flag

Reviewed by <mrg>

Reported-by: syzbot+25ac03024cedf27f3368%syzkaller.appspotmail.com@localhost

diffstat:

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

diffs (27 lines):

diff -r f485109f71d3 -r dd8d239ce99f sys/uvm/uvm_mmap.c
--- a/sys/uvm/uvm_mmap.c        Fri Oct 04 21:55:00 2019 +0000
+++ b/sys/uvm/uvm_mmap.c        Fri Oct 04 22:48:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_mmap.c,v 1.173 2019/08/06 08:10:27 maxv Exp $      */
+/*     $NetBSD: uvm_mmap.c,v 1.174 2019/10/04 22:48:45 kamil 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.173 2019/08/06 08:10:27 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.174 2019/10/04 22:48:45 kamil Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_pax.h"
@@ -861,7 +861,7 @@
        if (align) {
                if (align >= sizeof(vaddr_t) * NBBY)
                        return EINVAL;
-               align = 1L << align;
+               align = 1UL << align;
                if (align < PAGE_SIZE)
                        return EINVAL;
                if (align >= vm_map_max(map))



Home | Main Index | Thread Index | Old Index