Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/009cb6fbdbd6
branches:  netbsd-7
changeset: 799677:009cb6fbdbd6
user:      riz <riz%NetBSD.org@localhost>
date:      Sun Nov 08 00:38:45 2015 +0000

description:
Pull up following revision(s) (requested by christos in ticket #1013):
        sys/arch/x86/x86/sys_machdep.c: revision 1.29
fix broken error handling; error was used uninitialized. Changing the
compilation flags broke all threaded programs for me.
XXX: pullup-7

diffstat:

 sys/arch/x86/x86/sys_machdep.c |  13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diffs (55 lines):

diff -r e4a255c0ea15 -r 009cb6fbdbd6 sys/arch/x86/x86/sys_machdep.c
--- a/sys/arch/x86/x86/sys_machdep.c    Sun Nov 08 00:35:45 2015 +0000
+++ b/sys/arch/x86/x86/sys_machdep.c    Sun Nov 08 00:38:45 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $        */
+/*     $NetBSD: sys_machdep.c,v 1.28.2.1 2015/11/08 00:38:45 riz Exp $ */
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28 2014/06/28 21:13:12 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.28.2.1 2015/11/08 00:38:45 riz Exp $");
 
 #include "opt_mtrr.h"
 #include "opt_perfctrs.h"
@@ -659,7 +659,6 @@
 #else
        struct pcb *pcb;
        vaddr_t base;
-       int error;
 
        if (l->l_proc->p_flag & PK_32) {
                return x86_set_sdbase32(arg, which, l, direct);
@@ -668,7 +667,7 @@
        if (direct) {
                base = (vaddr_t)arg;
        } else {
-               error = copyin(arg, &base, sizeof(base));
+               int error = copyin(arg, &base, sizeof(base));
                if (error != 0)
                        return error;
        }
@@ -676,10 +675,6 @@
        if (base >= VM_MAXUSER_ADDRESS)
                return EINVAL;
 
-       if (error) {
-               return error;
-       }
-
        pcb = lwp_getpcb(l);
 
        kpreempt_disable();
@@ -699,7 +694,7 @@
        }
        kpreempt_enable();
 
-       return error;
+       return 0;
 #endif
 }
 



Home | Main Index | Thread Index | Old Index