summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2007-02-09 21:55:00 +0000
committerad <ad@NetBSD.org>2007-02-09 21:55:00 +0000
commitb07ec3fc388a5aeae51e8871aa89eefea3ce1e53 (patch)
treec93d3b23a29f98ac0e26c9d43afb509219d0ea42 /sys/compat/linux/common
parent5c1aad3ad0b9d2403784bd52128e8e8399e22254 (diff)
Merge newlock2 to head.
Diffstat (limited to 'sys/compat/linux/common')
-rw-r--r--sys/compat/linux/common/linux_blkio.c5
-rw-r--r--sys/compat/linux/common/linux_break.c5
-rw-r--r--sys/compat/linux/common/linux_cdrom.c5
-rw-r--r--sys/compat/linux/common/linux_exec.c7
-rw-r--r--sys/compat/linux/common/linux_exec.h4
-rw-r--r--sys/compat/linux/common/linux_exec_aout.c5
-rw-r--r--sys/compat/linux/common/linux_exec_elf32.c5
-rw-r--r--sys/compat/linux/common/linux_fdio.c5
-rw-r--r--sys/compat/linux/common/linux_file.c7
-rw-r--r--sys/compat/linux/common/linux_file64.c5
-rw-r--r--sys/compat/linux/common/linux_hdio.c5
-rw-r--r--sys/compat/linux/common/linux_ioctl.c5
-rw-r--r--sys/compat/linux/common/linux_ipc.c5
-rw-r--r--sys/compat/linux/common/linux_ipccall.c5
-rw-r--r--sys/compat/linux/common/linux_llseek.c5
-rw-r--r--sys/compat/linux/common/linux_misc.c12
-rw-r--r--sys/compat/linux/common/linux_misc_notalpha.c5
-rw-r--r--sys/compat/linux/common/linux_mtio.c5
-rw-r--r--sys/compat/linux/common/linux_oldmmap.c5
-rw-r--r--sys/compat/linux/common/linux_oldolduname.c5
-rw-r--r--sys/compat/linux/common/linux_oldselect.c5
-rw-r--r--sys/compat/linux/common/linux_olduname.c5
-rw-r--r--sys/compat/linux/common/linux_pipe.c5
-rw-r--r--sys/compat/linux/common/linux_sched.c5
-rw-r--r--sys/compat/linux/common/linux_sg.c5
-rw-r--r--sys/compat/linux/common/linux_sig_notalpha.c24
-rw-r--r--sys/compat/linux/common/linux_sigaction.c8
-rw-r--r--sys/compat/linux/common/linux_signal.c69
-rw-r--r--sys/compat/linux/common/linux_signal.h4
-rw-r--r--sys/compat/linux/common/linux_socket.c5
-rw-r--r--sys/compat/linux/common/linux_socketcall.c5
-rw-r--r--sys/compat/linux/common/linux_sysctl.c5
-rw-r--r--sys/compat/linux/common/linux_termios.c5
-rw-r--r--sys/compat/linux/common/linux_time.c5
-rw-r--r--sys/compat/linux/common/linux_uselib.c5
35 files changed, 121 insertions, 149 deletions
diff --git a/sys/compat/linux/common/linux_blkio.c b/sys/compat/linux/common/linux_blkio.c
index 378b2dca52e..3cc4267f317 100644
--- a/sys/compat/linux/common/linux_blkio.c
+++ b/sys/compat/linux/common/linux_blkio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_blkio.c,v 1.12 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_blkio.c,v 1.13 2007/02/09 21:55:19 ad Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_blkio.c,v 1.12 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_blkio.c,v 1.13 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,7 +47,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_blkio.c,v 1.12 2006/11/16 01:32:42 christos Ex
#include <sys/proc.h>
#include <sys/disklabel.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_break.c b/sys/compat/linux/common/linux_break.c
index 32d19e17b71..8af653d8109 100644
--- a/sys/compat/linux/common/linux_break.c
+++ b/sys/compat/linux/common/linux_break.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_break.c,v 1.53 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_break.c,v 1.54 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,13 +37,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_break.c,v 1.53 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_break.c,v 1.54 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_cdrom.c b/sys/compat/linux/common/linux_cdrom.c
index 0dca185d998..1ed44cedfb4 100644
--- a/sys/compat/linux/common/linux_cdrom.c
+++ b/sys/compat/linux/common/linux_cdrom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_cdrom.c,v 1.20 2006/06/12 00:42:18 christos Exp $ */
+/* $NetBSD: linux_cdrom.c,v 1.21 2007/02/09 21:55:19 ad Exp $ */
/*
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_cdrom.c,v 1.20 2006/06/12 00:42:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_cdrom.c,v 1.21 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,7 +47,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_cdrom.c,v 1.20 2006/06/12 00:42:18 christos Ex
#include <sys/dvdio.h>
#include <sys/malloc.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_exec.c b/sys/compat/linux/common/linux_exec.c
index d3821c2bb60..655fe4dc891 100644
--- a/sys/compat/linux/common/linux_exec.c
+++ b/sys/compat/linux/common/linux_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec.c,v 1.89 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_exec.c,v 1.90 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.89 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.90 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.89 2006/11/16 01:32:42 christos Exp
#include <sys/exec_elf.h>
#include <sys/mman.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <sys/ptrace.h> /* For proc_reparent() */
@@ -158,7 +157,7 @@ const struct emul emul_linux = {
uvm_default_mapaddr,
linux_usertrap,
- NULL,
+ 0,
};
static void
diff --git a/sys/compat/linux/common/linux_exec.h b/sys/compat/linux/common/linux_exec.h
index 61305942fd1..83722ca63c1 100644
--- a/sys/compat/linux/common/linux_exec.h
+++ b/sys/compat/linux/common/linux_exec.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec.h,v 1.39 2006/08/23 19:49:09 manu Exp $ */
+/* $NetBSD: linux_exec.h,v 1.40 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@ void linux_setregs __P((struct lwp *, struct exec_package *, u_long));
int exec_linux_aout_makecmds __P((struct lwp *, struct exec_package *));
int linux_aout_copyargs __P((struct lwp *, struct exec_package *,
struct ps_strings *, char **, void *));
-void linux_trapsignal __P((struct lwp *, const ksiginfo_t *));
+void linux_trapsignal __P((struct lwp *, ksiginfo_t *));
int linux_usertrap __P((struct lwp *, vaddr_t, void *));
#ifdef LINUX_NPTL
void linux_nptl_proc_fork __P((struct proc *, struct proc *,
diff --git a/sys/compat/linux/common/linux_exec_aout.c b/sys/compat/linux/common/linux_exec_aout.c
index 7bfca48af78..afa84451778 100644
--- a/sys/compat/linux/common/linux_exec_aout.c
+++ b/sys/compat/linux/common/linux_exec_aout.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_aout.c,v 1.60 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_exec_aout.c,v 1.61 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_aout.c,v 1.60 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_aout.c,v 1.61 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,7 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_aout.c,v 1.60 2006/11/16 01:32:42 christo
#include <sys/exec_elf.h>
#include <sys/mman.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <machine/cpu.h>
diff --git a/sys/compat/linux/common/linux_exec_elf32.c b/sys/compat/linux/common/linux_exec_elf32.c
index 48c3550ddd4..82efe4e63db 100644
--- a/sys/compat/linux/common/linux_exec_elf32.c
+++ b/sys/compat/linux/common/linux_exec_elf32.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_elf32.c,v 1.76 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_exec_elf32.c,v 1.77 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.76 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.77 2007/02/09 21:55:19 ad Exp $");
#ifndef ELFSIZE
/* XXX should die */
@@ -63,7 +63,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.76 2006/11/16 01:32:42 christ
#include <sys/kauth.h>
#include <sys/mman.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <machine/cpu.h>
diff --git a/sys/compat/linux/common/linux_fdio.c b/sys/compat/linux/common/linux_fdio.c
index 12161b92eed..778abfbe823 100644
--- a/sys/compat/linux/common/linux_fdio.c
+++ b/sys/compat/linux/common/linux_fdio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_fdio.c,v 1.8 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_fdio.c,v 1.9 2007/02/09 21:55:19 ad Exp $ */
/*
* Copyright (c) 2000 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_fdio.c,v 1.8 2005/12/11 12:20:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_fdio.c,v 1.9 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,7 +49,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_fdio.c,v 1.8 2005/12/11 12:20:19 christos Exp
#include <sys/fdio.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <dev/isa/fdreg.h>
diff --git a/sys/compat/linux/common/linux_file.c b/sys/compat/linux/common/linux_file.c
index 8acfa18bb3f..778ce492507 100644
--- a/sys/compat/linux/common/linux_file.c
+++ b/sys/compat/linux/common/linux_file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file.c,v 1.76 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_file.c,v 1.77 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.76 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.77 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -61,7 +61,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.76 2006/11/16 01:32:42 christos Exp
#include <sys/conf.h>
#include <sys/pipe.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@@ -209,7 +208,7 @@ linux_sys_open(l, v, retval)
* terminal yet, and the O_NOCTTY flag is not set, try to make
* this the controlling terminal.
*/
- if (!(fl & O_NOCTTY) && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
+ if (!(fl & O_NOCTTY) && SESS_LEADER(p) && !(p->p_lflag & PL_CONTROLT)) {
struct filedesc *fdp = p->p_fd;
struct file *fp;
diff --git a/sys/compat/linux/common/linux_file64.c b/sys/compat/linux/common/linux_file64.c
index cb6e173daf9..319f5709483 100644
--- a/sys/compat/linux/common/linux_file64.c
+++ b/sys/compat/linux/common/linux_file64.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file64.c,v 1.34 2006/07/23 22:06:09 ad Exp $ */
+/* $NetBSD: linux_file64.c,v 1.35 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.34 2006/07/23 22:06:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.35 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,7 +59,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.34 2006/07/23 22:06:09 ad Exp $")
#include <sys/tty.h>
#include <sys/conf.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_hdio.c b/sys/compat/linux/common/linux_hdio.c
index 157714b9ca9..04968aedba6 100644
--- a/sys/compat/linux/common/linux_hdio.c
+++ b/sys/compat/linux/common/linux_hdio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_hdio.c,v 1.10 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_hdio.c,v 1.11 2007/02/09 21:55:19 ad Exp $ */
/*
* Copyright (c) 2000 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_hdio.c,v 1.10 2005/12/11 12:20:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_hdio.c,v 1.11 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,7 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_hdio.c,v 1.10 2005/12/11 12:20:19 christos Exp
#include <dev/ic/wdcreg.h>
#include <sys/ataio.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_ioctl.c b/sys/compat/linux/common/linux_ioctl.c
index 15265618fa5..33264ff9485 100644
--- a/sys/compat/linux/common/linux_ioctl.c
+++ b/sys/compat/linux/common/linux_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ioctl.c,v 1.45 2006/07/23 22:06:09 ad Exp $ */
+/* $NetBSD: linux_ioctl.c,v 1.46 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.45 2006/07/23 22:06:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.46 2007/02/09 21:55:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "sequencer.h"
@@ -57,7 +57,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.45 2006/07/23 22:06:09 ad Exp $");
#include <net/if.h>
#include <sys/sockio.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_ipc.c b/sys/compat/linux/common/linux_ipc.c
index 18311e7b6b7..7abcbb3cc33 100644
--- a/sys/compat/linux/common/linux_ipc.c
+++ b/sys/compat/linux/common/linux_ipc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ipc.c,v 1.37 2006/09/13 19:55:49 manu Exp $ */
+/* $NetBSD: linux_ipc.c,v 1.38 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.37 2006/09/13 19:55:49 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.38 2007/02/09 21:55:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -51,7 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.37 2006/09/13 19:55:49 manu Exp $");
#include <sys/systm.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_ipccall.c b/sys/compat/linux/common/linux_ipccall.c
index 6fc821f1908..3a8297f6bf6 100644
--- a/sys/compat/linux/common/linux_ipccall.c
+++ b/sys/compat/linux/common/linux_ipccall.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ipccall.c,v 1.26 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_ipccall.c,v 1.27 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ipccall.c,v 1.26 2005/12/11 12:20:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ipccall.c,v 1.27 2007/02/09 21:55:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_ipccall.c,v 1.26 2005/12/11 12:20:19 christos
/* real syscalls */
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
/* sys_ipc + args prototype */
diff --git a/sys/compat/linux/common/linux_llseek.c b/sys/compat/linux/common/linux_llseek.c
index 5d6d27b6fae..d27850df0be 100644
--- a/sys/compat/linux/common/linux_llseek.c
+++ b/sys/compat/linux/common/linux_llseek.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_llseek.c,v 1.27 2003/01/18 08:02:53 thorpej Exp $ */
+/* $NetBSD: linux_llseek.c,v 1.28 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_llseek.c,v 1.27 2003/01/18 08:02:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_llseek.c,v 1.28 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,7 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_llseek.c,v 1.27 2003/01/18 08:02:53 thorpej Ex
#include <sys/malloc.h>
#include <sys/conf.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c
index a2ed00cffed..5564426d558 100644
--- a/sys/compat/linux/common/linux_misc.c
+++ b/sys/compat/linux/common/linux_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.165 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_misc.c,v 1.166 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.165 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.166 2007/02/09 21:55:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ptrace.h"
@@ -104,7 +104,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.165 2006/11/16 01:32:42 christos Ex
#include <sys/ptrace.h>
#include <machine/ptrace.h>
-#include <sys/sa.h>
#include <sys/syscall.h>
#include <sys/syscallargs.h>
@@ -269,7 +268,7 @@ linux_sys_wait4(l, v, retval)
if ((error = sys_wait4(l, &w4a, retval)))
return error;
- sigdelset(&p->p_sigctx.ps_siglist, SIGCHLD);
+ sigdelset(&p->p_sigpend.sp_set, SIGCHLD); /* XXXAD ksiginfo leak */
if (status != NULL) {
if ((error = copyin(status, &tstat, sizeof tstat)))
@@ -781,12 +780,13 @@ linux_sys_times(l, v, retval)
struct linux_tms ltms;
struct rusage ru;
- calcru(p, &ru.ru_utime, &ru.ru_stime, NULL);
+ mutex_enter(&p->p_smutex);
+ calcru(p, &ru.ru_utime, &ru.ru_stime, NULL, NULL);
ltms.ltms_utime = CONVTCK(ru.ru_utime);
ltms.ltms_stime = CONVTCK(ru.ru_stime);
-
ltms.ltms_cutime = CONVTCK(p->p_stats->p_cru.ru_utime);
ltms.ltms_cstime = CONVTCK(p->p_stats->p_cru.ru_stime);
+ mutex_exit(&p->p_smutex);
if ((error = copyout(&ltms, SCARG(uap, tms), sizeof ltms)))
return error;
diff --git a/sys/compat/linux/common/linux_misc_notalpha.c b/sys/compat/linux/common/linux_misc_notalpha.c
index ecda951f068..330a81a9d10 100644
--- a/sys/compat/linux/common/linux_misc_notalpha.c
+++ b/sys/compat/linux/common/linux_misc_notalpha.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc_notalpha.c,v 1.84 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_misc_notalpha.c,v 1.85 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.84 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.85 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,7 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.84 2006/11/16 01:32:42 chr
#include <sys/wait.h>
#include <sys/kauth.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_mtio.c b/sys/compat/linux/common/linux_mtio.c
index 82ce93458b9..a11e9e0895f 100644
--- a/sys/compat/linux/common/linux_mtio.c
+++ b/sys/compat/linux/common/linux_mtio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mtio.c,v 1.2 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_mtio.c,v 1.3 2007/02/09 21:55:19 ad Exp $ */
/*
* Copyright (c) 2005 Soren S. Jorvang. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_mtio.c,v 1.2 2005/12/11 12:20:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mtio.c,v 1.3 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -38,7 +38,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mtio.c,v 1.2 2005/12/11 12:20:19 christos Exp
#include <sys/mtio.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_oldmmap.c b/sys/compat/linux/common/linux_oldmmap.c
index 4f0c953a021..a9eb810bc47 100644
--- a/sys/compat/linux/common/linux_oldmmap.c
+++ b/sys/compat/linux/common/linux_oldmmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_oldmmap.c,v 1.65 2006/02/09 19:18:56 manu Exp $ */
+/* $NetBSD: linux_oldmmap.c,v 1.66 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,13 +37,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.65 2006/02/09 19:18:56 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.66 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <uvm/uvm_param.h>
diff --git a/sys/compat/linux/common/linux_oldolduname.c b/sys/compat/linux/common/linux_oldolduname.c
index e3824500332..b6ceac2653c 100644
--- a/sys/compat/linux/common/linux_oldolduname.c
+++ b/sys/compat/linux/common/linux_oldolduname.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_oldolduname.c,v 1.60 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_oldolduname.c,v 1.61 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,14 +37,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_oldolduname.c,v 1.60 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_oldolduname.c,v 1.61 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_oldselect.c b/sys/compat/linux/common/linux_oldselect.c
index 1cb09931e07..fe3655c125e 100644
--- a/sys/compat/linux/common/linux_oldselect.c
+++ b/sys/compat/linux/common/linux_oldselect.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_oldselect.c,v 1.53 2003/01/18 08:04:38 thorpej Exp $ */
+/* $NetBSD: linux_oldselect.c,v 1.54 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,13 +37,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_oldselect.c,v 1.53 2003/01/18 08:04:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_oldselect.c,v 1.54 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_olduname.c b/sys/compat/linux/common/linux_olduname.c
index b3ad5b1cbab..b0bff614ca2 100644
--- a/sys/compat/linux/common/linux_olduname.c
+++ b/sys/compat/linux/common/linux_olduname.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_olduname.c,v 1.60 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_olduname.c,v 1.61 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_olduname.c,v 1.60 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_olduname.c,v 1.61 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,7 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_olduname.c,v 1.60 2006/11/16 01:32:42 christos
#include <sys/mman.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_pipe.c b/sys/compat/linux/common/linux_pipe.c
index bd188ed02be..2ba4eee585c 100644
--- a/sys/compat/linux/common/linux_pipe.c
+++ b/sys/compat/linux/common/linux_pipe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_pipe.c,v 1.57 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_pipe.c,v 1.58 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.57 2005/12/11 12:20:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.58 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,7 +47,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_pipe.c,v 1.57 2005/12/11 12:20:19 christos Exp
#include <sys/mman.h>
#include <sys/mount.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_sched.c b/sys/compat/linux/common/linux_sched.c
index f5d0879fc7b..a0afcab2d68 100644
--- a/sys/compat/linux/common/linux_sched.c
+++ b/sys/compat/linux/common/linux_sched.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sched.c,v 1.39 2007/02/05 18:31:36 njoly Exp $ */
+/* $NetBSD: linux_sched.c,v 1.40 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.39 2007/02/05 18:31:36 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.40 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -50,7 +50,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.39 2007/02/05 18:31:36 njoly Exp $
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/malloc.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <sys/wait.h>
#include <sys/kauth.h>
diff --git a/sys/compat/linux/common/linux_sg.c b/sys/compat/linux/common/linux_sg.c
index 55a961fbfc6..37042783990 100644
--- a/sys/compat/linux/common/linux_sg.c
+++ b/sys/compat/linux/common/linux_sg.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sg.c,v 1.8 2006/09/13 00:51:12 christos Exp $ */
+/* $NetBSD: linux_sg.c,v 1.9 2007/02/09 21:55:19 ad Exp $ */
/*
* Copyright (c) 2004 Soren S. Jorvang. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sg.c,v 1.8 2006/09/13 00:51:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sg.c,v 1.9 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -41,7 +41,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sg.c,v 1.8 2006/09/13 00:51:12 christos Exp $"
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_sig_notalpha.c b/sys/compat/linux/common/linux_sig_notalpha.c
index 73d9bc19bb9..d2624cadf10 100644
--- a/sys/compat/linux/common/linux_sig_notalpha.c
+++ b/sys/compat/linux/common/linux_sig_notalpha.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sig_notalpha.c,v 1.32 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_sig_notalpha.c,v 1.33 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.32 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.33 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.32 2006/11/16 01:32:42 chri
#include <sys/signal.h>
#include <sys/signalvar.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@@ -81,7 +80,6 @@ linux_sys_signal(l, v, retval)
syscallarg(int) signum;
syscallarg(linux_handler_t) handler;
} */ *uap = v;
- struct proc *p = l->l_proc;
struct sigaction nbsa, obsa;
int error, sig;
@@ -93,7 +91,7 @@ linux_sys_signal(l, v, retval)
nbsa.sa_handler = SCARG(uap, handler);
sigemptyset(&nbsa.sa_mask);
nbsa.sa_flags = SA_RESETHAND | SA_NODEFER;
- error = sigaction1(p, linux_to_native_signo[sig],
+ error = sigaction1(l, linux_to_native_signo[sig],
&nbsa, &obsa, NULL, 0);
if (error == 0)
*retval = (int)(long)obsa.sa_handler; /* XXXmanu cast */
@@ -111,7 +109,9 @@ linux_sys_siggetmask(struct lwp *l, void *v,
linux_old_sigset_t lss;
int error;
- error = sigprocmask1(p, SIG_SETMASK, 0, &bss);
+ mutex_enter(&p->p_smutex);
+ error = sigprocmask1(l, SIG_SETMASK, 0, &bss);
+ mutex_exit(&p->p_smutex);
if (error)
return (error);
native_to_linux_old_sigset(&lss, &bss);
@@ -133,14 +133,16 @@ linux_sys_sigsetmask(l, v, retval)
struct linux_sys_sigsetmask_args /* {
syscallarg(linux_old_sigset_t) mask;
} */ *uap = v;
- struct proc *p = l->l_proc;
sigset_t nbss, obss;
linux_old_sigset_t nlss, olss;
+ struct proc *p = l->l_proc;
int error;
nlss = SCARG(uap, mask);
linux_old_to_native_sigset(&nbss, &nlss);
- error = sigprocmask1(p, SIG_SETMASK, &nbss, &obss);
+ mutex_enter(&p->p_smutex);
+ error = sigprocmask1(l, SIG_SETMASK, &nbss, &obss);
+ mutex_exit(&p->p_smutex);
if (error)
return (error);
native_to_linux_old_sigset(&olss, &obss);
@@ -156,9 +158,8 @@ linux_sys_sigprocmask(struct lwp *l, void *v, register_t *retval)
syscallarg(const linux_old_sigset_t *) set;
syscallarg(linux_old_sigset_t *) oset;
} */ *uap = v;
- struct proc *p = l->l_proc;
- return(linux_sigprocmask1(p, SCARG(uap, how),
+ return(linux_sigprocmask1(l, SCARG(uap, how),
SCARG(uap, set), SCARG(uap, oset)));
}
#endif /* !__amd64__ */
@@ -170,8 +171,7 @@ linux_sys_sigprocmask(struct lwp *l, void *v, register_t *retval)
int
linux_sys_pause(struct lwp *l, void *v, register_t *retval)
{
- struct proc *p = l->l_proc;
- return (sigsuspend1(p, 0));
+ return (sigsuspend1(l, 0));
}
diff --git a/sys/compat/linux/common/linux_sigaction.c b/sys/compat/linux/common/linux_sigaction.c
index 33b4e15d0f3..b40c2f6f933 100644
--- a/sys/compat/linux/common/linux_sigaction.c
+++ b/sys/compat/linux/common/linux_sigaction.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sigaction.c,v 1.29 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_sigaction.c,v 1.30 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.29 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.30 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sigaction.c,v 1.29 2006/11/16 01:32:42 christo
#include <sys/signal.h>
#include <sys/signalvar.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@@ -77,7 +76,6 @@ linux_sys_sigaction(struct lwp *l, void *v, register_t *retval)
syscallarg(const struct linux_old_sigaction *) nsa;
syscallarg(struct linux_old_sigaction *) osa;
} */ *uap = v;
- struct proc *p = l->l_proc;
struct linux_old_sigaction nlsa, olsa;
struct sigaction nbsa, obsa;
int error, sig;
@@ -100,7 +98,7 @@ linux_sys_sigaction(struct lwp *l, void *v, register_t *retval)
sigemptyset(&obsa.sa_mask);
obsa.sa_flags = 0;
} else {
- error = sigaction1(p, linux_to_native_signo[sig],
+ error = sigaction1(l, linux_to_native_signo[sig],
SCARG(uap, nsa) ? &nbsa : 0, SCARG(uap, osa) ? &obsa : 0,
NULL, 0);
if (error)
diff --git a/sys/compat/linux/common/linux_signal.c b/sys/compat/linux/common/linux_signal.c
index 0fb144449a0..d767cf103fb 100644
--- a/sys/compat/linux/common/linux_signal.c
+++ b/sys/compat/linux/common/linux_signal.c
@@ -1,4 +1,5 @@
-/* $NetBSD: linux_signal.c,v 1.52 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_signal.c,v 1.53 2007/02/09 21:55:19 ad Exp $ */
+
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -54,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.52 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.53 2007/02/09 21:55:19 ad Exp $");
#define COMPAT_LINUX 1
@@ -70,7 +71,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.52 2006/11/16 01:32:42 christos E
#include <sys/signalvar.h>
#include <sys/malloc.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
@@ -288,14 +288,13 @@ linux_sys_rt_sigaction(struct lwp *l, void *v, register_t *retval)
syscallarg(struct linux_sigaction *) osa;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
- struct proc *p = l->l_proc;
struct linux_sigaction nlsa, olsa;
struct sigaction nbsa, obsa;
int error, sig;
void *tramp = NULL;
int vers = 0;
#if defined __amd64__
- struct sigacts *ps = p->p_sigacts;
+ struct sigacts *ps = l->l_proc->p_sigacts;
#endif
if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
@@ -324,7 +323,7 @@ linux_sys_rt_sigaction(struct lwp *l, void *v, register_t *retval)
}
#endif
- error = sigaction1(p, linux_to_native_signo[sig],
+ error = sigaction1(l, linux_to_native_signo[sig],
SCARG(uap, nsa) ? &nbsa : NULL,
SCARG(uap, osa) ? &obsa : NULL,
tramp, vers);
@@ -349,12 +348,13 @@ linux_sys_rt_sigaction(struct lwp *l, void *v, register_t *retval)
}
int
-linux_sigprocmask1(p, how, set, oset)
- struct proc *p;
+linux_sigprocmask1(l, how, set, oset)
+ struct lwp *l;
int how;
const linux_old_sigset_t *set;
linux_old_sigset_t *oset;
{
+ struct proc *p = l->l_proc;
linux_old_sigset_t nlss, olss;
sigset_t nbss, obss;
int error;
@@ -379,8 +379,10 @@ linux_sigprocmask1(p, how, set, oset)
return (error);
linux_old_to_native_sigset(&nbss, &nlss);
}
- error = sigprocmask1(p, how,
+ mutex_enter(&p->p_smutex);
+ error = sigprocmask1(l, how,
set ? &nbss : NULL, oset ? &obss : NULL);
+ mutex_exit(&p->p_smutex);
if (error)
return (error);
if (oset) {
@@ -401,9 +403,9 @@ linux_sys_rt_sigprocmask(struct lwp *l, void *v, register_t *retval)
syscallarg(linux_sigset_t *) oset;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
- struct proc *p = l->l_proc;
linux_sigset_t nlss, olss, *oset;
const linux_sigset_t *set;
+ struct proc *p = l->l_proc;
sigset_t nbss, obss;
int error, how;
@@ -433,8 +435,10 @@ linux_sys_rt_sigprocmask(struct lwp *l, void *v, register_t *retval)
return (error);
linux_to_native_sigset(&nbss, &nlss);
}
- error = sigprocmask1(p, how,
+ mutex_enter(&p->p_smutex);
+ error = sigprocmask1(l, how,
set ? &nbss : NULL, oset ? &obss : NULL);
+ mutex_exit(&p->p_smutex);
if (!error && oset) {
native_to_linux_sigset(&olss, &obss);
error = copyout(&olss, oset, sizeof(olss));
@@ -449,14 +453,13 @@ linux_sys_rt_sigpending(struct lwp *l, void *v, register_t *retval)
syscallarg(linux_sigset_t *) set;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
- struct proc *p = l->l_proc;
sigset_t bss;
linux_sigset_t lss;
if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t))
return (EINVAL);
- sigpending1(p, &bss);
+ sigpending1(l, &bss);
native_to_linux_sigset(&lss, &bss);
return copyout(&lss, SCARG(uap, set), sizeof(lss));
}
@@ -468,11 +471,10 @@ linux_sys_sigpending(struct lwp *l, void *v, register_t *retval)
struct linux_sys_sigpending_args /* {
syscallarg(linux_old_sigset_t *) mask;
} */ *uap = v;
- struct proc *p = l->l_proc;
sigset_t bss;
linux_old_sigset_t lss;
- sigpending1(p, &bss);
+ sigpending1(l, &bss);
native_to_linux_old_sigset(&lss, &bss);
return copyout(&lss, SCARG(uap, set), sizeof(lss));
}
@@ -485,13 +487,12 @@ linux_sys_sigsuspend(struct lwp *l, void *v, register_t *retval)
syscallarg(int) oldmask;
syscallarg(int) mask;
} */ *uap = v;
- struct proc *p = l->l_proc;
linux_old_sigset_t lss;
sigset_t bss;
lss = SCARG(uap, mask);
linux_old_to_native_sigset(&bss, &lss);
- return (sigsuspend1(p, &bss));
+ return (sigsuspend1(l, &bss));
}
#endif /* __amd64__ */
@@ -502,7 +503,6 @@ linux_sys_rt_sigsuspend(struct lwp *l, void *v, register_t *retval)
syscallarg(linux_sigset_t *) unewset;
syscallarg(size_t) sigsetsize;
} */ *uap = v;
- struct proc *p = l->l_proc;
linux_sigset_t lss;
sigset_t bss;
int error;
@@ -516,7 +516,7 @@ linux_sys_rt_sigsuspend(struct lwp *l, void *v, register_t *retval)
linux_to_native_sigset(&bss, &lss);
- return (sigsuspend1(p, &bss));
+ return (sigsuspend1(l, &bss));
}
/*
@@ -606,13 +606,13 @@ linux_sys_sigaltstack(struct lwp *l, void *v, register_t *retval)
syscallarg(const struct linux_sigaltstack *) ss;
syscallarg(struct linux_sigaltstack *) oss;
} */ *uap = v;
- struct proc *p = l->l_proc;
struct linux_sigaltstack ss;
struct sigaltstack nss;
- int error;
+ struct proc *p = l->l_proc;
+ int error = 0;
if (SCARG(uap, oss)) {
- native_to_linux_sigaltstack(&ss, &p->p_sigctx.ps_sigstk);
+ native_to_linux_sigaltstack(&ss, &l->l_sigstk);
if ((error = copyout(&ss, SCARG(uap, oss), sizeof(ss))) != 0)
return error;
}
@@ -622,20 +622,23 @@ linux_sys_sigaltstack(struct lwp *l, void *v, register_t *retval)
return error;
linux_to_native_sigaltstack(&nss, &ss);
+ mutex_enter(&p->p_smutex);
+
if (nss.ss_flags & ~SS_ALLBITS)
- return EINVAL;
-
- if (nss.ss_flags & SS_DISABLE) {
- if (p->p_sigctx.ps_sigstk.ss_flags & SS_ONSTACK)
- return EINVAL;
- } else {
- if (nss.ss_size < LINUX_MINSIGSTKSZ)
- return ENOMEM;
- }
- p->p_sigctx.ps_sigstk = nss;
+ error = EINVAL;
+ else if (nss.ss_flags & SS_DISABLE) {
+ if (l->l_sigstk.ss_flags & SS_ONSTACK)
+ error = EINVAL;
+ } else if (nss.ss_size < LINUX_MINSIGSTKSZ)
+ error = ENOMEM;
+
+ if (error == 0)
+ l->l_sigstk = nss;
+
+ mutex_exit(&p->p_smutex);
}
- return 0;
+ return error;
}
#endif /* LINUX_SS_ONSTACK */
diff --git a/sys/compat/linux/common/linux_signal.h b/sys/compat/linux/common/linux_signal.h
index 0d148545568..165bfb33bf6 100644
--- a/sys/compat/linux/common/linux_signal.h
+++ b/sys/compat/linux/common/linux_signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_signal.h,v 1.25 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_signal.h,v 1.26 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
extern const int native_to_linux_signo[];
extern const int linux_to_native_signo[];
__BEGIN_DECLS
-int linux_sigprocmask1 __P((struct proc *, int, const linux_old_sigset_t *,
+int linux_sigprocmask1 __P((struct lwp *, int, const linux_old_sigset_t *,
linux_old_sigset_t *));
#if LINUX__NSIG_WORDS > 1
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c
index 1bdbadf4292..014bbeab2de 100644
--- a/sys/compat/linux/common/linux_socket.c
+++ b/sys/compat/linux/common/linux_socket.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.68 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_socket.c,v 1.69 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.68 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.69 2007/02/09 21:55:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -76,7 +76,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.68 2006/11/16 01:32:42 christos E
#include <sys/exec.h>
#include <sys/kauth.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <lib/libkern/libkern.h>
diff --git a/sys/compat/linux/common/linux_socketcall.c b/sys/compat/linux/common/linux_socketcall.c
index 8c0b34e0878..0a1a8990c0e 100644
--- a/sys/compat/linux/common/linux_socketcall.c
+++ b/sys/compat/linux/common/linux_socketcall.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socketcall.c,v 1.30 2005/12/11 12:20:19 christos Exp $ */
+/* $NetBSD: linux_socketcall.c,v 1.31 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_socketcall.c,v 1.30 2005/12/11 12:20:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socketcall.c,v 1.31 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -59,7 +59,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_socketcall.c,v 1.30 2005/12/11 12:20:19 christ
#include <sys/vnode.h>
#include <sys/device.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_sysctl.c b/sys/compat/linux/common/linux_sysctl.c
index 74955b984c8..11de9241240 100644
--- a/sys/compat/linux/common/linux_sysctl.c
+++ b/sys/compat/linux/common/linux_sysctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sysctl.c,v 1.24 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_sysctl.c,v 1.25 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.24 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.25 2007/02/09 21:55:19 ad Exp $");
#if defined (_KERNEL_OPT)
#include "opt_ktrace.h"
@@ -53,7 +53,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.24 2006/11/16 01:32:42 christos E
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/sysctl.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#ifdef KTRACE
#include <sys/ktrace.h>
diff --git a/sys/compat/linux/common/linux_termios.c b/sys/compat/linux/common/linux_termios.c
index 7eb97511af8..f39c37e4537 100644
--- a/sys/compat/linux/common/linux_termios.c
+++ b/sys/compat/linux/common/linux_termios.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_termios.c,v 1.27 2006/11/25 22:03:41 elad Exp $ */
+/* $NetBSD: linux_termios.c,v 1.28 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.27 2006/11/25 22:03:41 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.28 2007/02/09 21:55:19 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ptm.h"
@@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.27 2006/11/25 22:03:41 elad Exp
#include <sys/mount.h>
#include <sys/termios.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <compat/linux/common/linux_types.h>
diff --git a/sys/compat/linux/common/linux_time.c b/sys/compat/linux/common/linux_time.c
index 3fdd0fa614a..7a88e12341a 100644
--- a/sys/compat/linux/common/linux_time.c
+++ b/sys/compat/linux/common/linux_time.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp $ */
+/* $NetBSD: linux_time.c,v 1.15 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.15 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/ucred.h>
@@ -46,7 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.14 2006/05/14 03:40:54 christos Exp
#include <sys/stdint.h>
#include <sys/time.h>
#include <sys/systm.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <sys/lwp.h>
#include <sys/proc.h>
diff --git a/sys/compat/linux/common/linux_uselib.c b/sys/compat/linux/common/linux_uselib.c
index db2063c1c06..837bf923001 100644
--- a/sys/compat/linux/common/linux_uselib.c
+++ b/sys/compat/linux/common/linux_uselib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_uselib.c,v 1.18 2006/11/16 01:32:42 christos Exp $ */
+/* $NetBSD: linux_uselib.c,v 1.19 2007/02/09 21:55:19 ad Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.18 2006/11/16 01:32:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.19 2007/02/09 21:55:19 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,7 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.18 2006/11/16 01:32:42 christos E
#include <sys/exec_elf.h>
#include <sys/mman.h>
-#include <sys/sa.h>
#include <sys/syscallargs.h>
#include <machine/cpu.h>