Module Name:    src
Committed By:   matt
Date:           Fri May 15 07:52:51 UTC 2015

Modified Files:
        src/sys/compat/netbsd32: netbsd32_lwp.c

Log Message:
In lwp_ctl, convert ptr to 32 bits before copyout.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/compat/netbsd32/netbsd32_lwp.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/compat/netbsd32/netbsd32_lwp.c
diff -u src/sys/compat/netbsd32/netbsd32_lwp.c:1.16 src/sys/compat/netbsd32/netbsd32_lwp.c:1.17
--- src/sys/compat/netbsd32/netbsd32_lwp.c:1.16	Fri May 15 07:45:15 2015
+++ src/sys/compat/netbsd32/netbsd32_lwp.c	Fri May 15 07:52:51 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_lwp.c,v 1.16 2015/05/15 07:45:15 matt Exp $	*/
+/*	$NetBSD: netbsd32_lwp.c,v 1.17 2015/05/15 07:52:51 matt Exp $	*/
 
 /*
  *  Copyright (c) 2005, 2006, 2007 The NetBSD Foundation.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.16 2015/05/15 07:45:15 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.17 2015/05/15 07:52:51 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -280,6 +280,7 @@ netbsd32__lwp_ctl(struct lwp *l, const s
 		syscallarg(int) features;
 		syscallarg(netbsd32_pointer_t) address;
 	} */
+	netbsd32_pointer_t vaddr32;
 	int error, features;
 	vaddr_t vaddr;
 
@@ -289,6 +290,7 @@ netbsd32__lwp_ctl(struct lwp *l, const s
 		return ENODEV;
 	if ((error = lwp_ctl_alloc(&vaddr)) != 0)
 		return error;
-	return copyout(&vaddr, SCARG_P32(uap, address),
+	NETBSD32PTR32(vaddr32, (void *)vaddr);
+	return copyout(&vaddr32, SCARG_P32(uap, address),
 	    sizeof(netbsd32_pointer_t));
 }

Reply via email to