Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/23ca8a7cd6d4
branches:  netbsd-6
changeset: 774348:23ca8a7cd6d4
user:      riz <riz%NetBSD.org@localhost>
date:      Sat Jul 21 00:01:45 2012 +0000

description:
Pull up following revision(s) (requested by christos in ticket #431):
        sys/compat/netbsd32/netbsd32_lwp.c: revision 1.14
always allocate a full ucontext structure so that we don't corrupt memory.
XXX: needs pullup to 6?

diffstat:

 sys/compat/netbsd32/netbsd32_lwp.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 308591acc5b4 -r 23ca8a7cd6d4 sys/compat/netbsd32/netbsd32_lwp.c
--- a/sys/compat/netbsd32/netbsd32_lwp.c        Sat Jul 21 00:00:13 2012 +0000
+++ b/sys/compat/netbsd32/netbsd32_lwp.c        Sat Jul 21 00:01:45 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_lwp.c,v 1.12.10.1 2012/05/21 15:25:59 riz Exp $       */
+/*     $NetBSD: netbsd32_lwp.c,v 1.12.10.2 2012/07/21 00:01:45 riz 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.12.10.1 2012/05/21 15:25:59 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.12.10.2 2012/07/21 00:01:45 riz Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -60,7 +60,7 @@
 
        KASSERT(p->p_emul->e_ucsize == sizeof(*newuc));
 
-       newuc = kmem_alloc(sizeof(ucontext32_t), KM_SLEEP);
+       newuc = kmem_alloc(sizeof(ucontext_t), KM_SLEEP);
        error = copyin(SCARG_P32(uap, ucp), newuc, p->p_emul->e_ucsize);
        if (error)
                goto fail;
@@ -85,7 +85,7 @@
        return copyout(&lid, SCARG_P32(uap, new_lwp), sizeof(lid));
 
 fail:
-       kmem_free(newuc, sizeof(*newuc));
+       kmem_free(newuc, sizeof(ucontext_t));
        return error;
 }
 



Home | Main Index | Thread Index | Old Index