Module Name:    src
Committed By:   ryo
Date:           Thu Oct 13 08:56:31 UTC 2016

Modified Files:
        src/sys/dev: mm.c

Log Message:
/dev/mem cannot lseek over 0x80000000 on 32bit architectures.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/mm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mm.c
diff -u src/sys/dev/mm.c:1.21 src/sys/dev/mm.c:1.22
--- src/sys/dev/mm.c:1.21	Mon Jul 11 16:13:28 2016
+++ src/sys/dev/mm.c	Thu Oct 13 08:56:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mm.c,v 1.21 2016/07/11 16:13:28 matt Exp $	*/
+/*	$NetBSD: mm.c,v 1.22 2016/10/13 08:56:31 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.21 2016/07/11 16:13:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.22 2016/10/13 08:56:31 ryo Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -164,7 +164,7 @@ dev_mem_readwrite(struct uio *uio, struc
 	int color = 0;
 
 	/* Check for wrap around. */
-	if ((intptr_t)uio->uio_offset != uio->uio_offset) {
+	if ((uintptr_t)uio->uio_offset != uio->uio_offset) {
 		return EFAULT;
 	}
 	paddr = uio->uio_offset & ~PAGE_MASK;

Reply via email to