Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2003 11:06:09 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30708 for review
Message-ID:  <200305071806.h47I69hs051243@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30708

Change 30708 by jhb@jhb_laptop on 2003/05/07 11:05:24

	IFC @30704.

Affected files ...

.. //depot/projects/smpng/sys/amd64/include/ieeefp.h#1 branch
.. //depot/projects/smpng/sys/conf/NOTES#43 integrate
.. //depot/projects/smpng/sys/conf/newvers.sh#4 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#11 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-pci.h#7 integrate
.. //depot/projects/smpng/sys/dev/em/if_em.c#21 integrate
.. //depot/projects/smpng/sys/dev/usb/uhci_pci.c#3 integrate
.. //depot/projects/smpng/sys/geom/geom_bsd.c#30 integrate
.. //depot/projects/smpng/sys/geom/geom_io.c#20 integrate
.. //depot/projects/smpng/sys/i386/isa/intr_machdep.c#19 integrate
.. //depot/projects/smpng/sys/kern/kern_sig.c#65 integrate
.. //depot/projects/smpng/sys/kern/kern_subr.c#23 integrate
.. //depot/projects/smpng/sys/kern/kern_synch.c#48 integrate
.. //depot/projects/smpng/sys/kern/uipc_syscalls.c#33 integrate
.. //depot/projects/smpng/sys/kern/vfs_default.c#20 integrate
.. //depot/projects/smpng/sys/netinet/ip_input.c#34 integrate
.. //depot/projects/smpng/sys/netinet/tcp_input.c#33 integrate
.. //depot/projects/smpng/sys/netinet/tcp_subr.c#31 integrate
.. //depot/projects/smpng/sys/netinet/tcp_var.h#14 integrate
.. //depot/projects/smpng/sys/pci/if_sis.c#25 integrate
.. //depot/projects/smpng/sys/sys/dkstat.h#3 integrate
.. //depot/projects/smpng/sys/sys/signalvar.h#15 integrate
.. //depot/projects/smpng/sys/sys/syscallsubr.h#7 integrate
.. //depot/projects/smpng/sys/vm/swap_pager.c#26 integrate
.. //depot/projects/smpng/sys/vm/vm_object.c#34 integrate
.. //depot/projects/smpng/sys/vm/vm_pager.c#12 integrate
.. //depot/projects/smpng/sys/vm/vnode_pager.c#30 integrate

Differences ...

==== //depot/projects/smpng/sys/conf/NOTES#43 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1147 2003/05/03 10:16:55 akiyama Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1148 2003/05/05 21:21:31 phk Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -116,15 +116,15 @@
 #
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-options 	GEOM_AES
-options 	GEOM_APPLE
-options 	GEOM_BDE
-options 	GEOM_BSD
-options 	GEOM_GPT
-options 	GEOM_MBR
-options 	GEOM_PC98
-options 	GEOM_SUNLABEL
-options 	GEOM_VOL
+options 	GEOM_AES		# Don't use, use GEOM_BDE
+options 	GEOM_APPLE		# Apple partitioning
+options 	GEOM_BDE		# Disk encryption.
+options 	GEOM_BSD		# BSD disklabels
+options 	GEOM_GPT		# GPT partitioning
+options 	GEOM_MBR		# DOS/MBR partitioning
+options 	GEOM_PC98		# NEC PC9800 partitioning
+options 	GEOM_SUNLABEL		# Sun/Solaris partitioning
+options 	GEOM_VOL		# Volume names from UFS superblock
 
 #
 # The root device and filesystem type can be compiled in;

==== //depot/projects/smpng/sys/conf/newvers.sh#4 (text+ko) ====

@@ -32,11 +32,11 @@
 # SUCH DAMAGE.
 #
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.49 2002/12/13 08:47:15 murray Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.50 2003/05/06 03:55:24 scottl Exp $
 
 TYPE="FreeBSD"
-REVISION="5.0"
-BRANCH="CURRENT"
+REVISION="5.1"
+BRANCH="BETA"
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
 

==== //depot/projects/smpng/sys/dev/ata/ata-chipset.c#11 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.23 2003/05/03 18:26:00 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.24 2003/05/06 19:31:56 jhb Exp $
  */
 #include "opt_ata.h"
 #include <sys/param.h>
@@ -773,6 +773,7 @@
      { ATA_I82801CA,   0, 0, 0x00, ATA_UDMA5, "Intel ICH3" },
      { ATA_I82801CA_1, 0, 0, 0x00, ATA_UDMA5, "Intel ICH3" },
      { ATA_I82801DB,   0, 0, 0x00, ATA_UDMA5, "Intel ICH4" },
+     { ATA_I82801EB,   0, 0, 0x00, ATA_UDMA5, "Intel ICH5" },
      { 0, 0, 0, 0, 0, 0}};
     char buffer[64]; 
 

==== //depot/projects/smpng/sys/dev/ata/ata-pci.h#7 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.8 2003/05/01 06:20:50 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.9 2003/05/06 19:31:56 jhb Exp $
  */
 
 /* structure holding chipset config info */
@@ -111,6 +111,7 @@
 #define ATA_I82801CA		0x248a8086
 #define ATA_I82801CA_1		0x248b8086
 #define ATA_I82801DB		0x24cb8086
+#define ATA_I82801EB		0x24db8086
 
 #define ATA_NVIDIA_ID		0x10de
 #define ATA_NFORCE1		0x01bc10de

==== //depot/projects/smpng/sys/dev/em/if_em.c#21 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/
 
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.24 2003/05/03 07:35:47 pdeuskar Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.25 2003/05/06 03:55:12 des Exp $*/
 
 #include <dev/em/if_em.h>
 
@@ -1777,7 +1777,8 @@
                              BUS_DMA_NOWAIT, &dma->dma_map);
         if (r != 0) {
                 printf("em%d: em_dma_malloc: bus_dmammem_alloc failed; "
-                        "size %u, error %u\n", adapter->unit, size, r);
+                        "size %ju, error %d\n", adapter->unit,
+			(uintmax_t)size, r);
                 goto fail_2;
         }
 

==== //depot/projects/smpng/sys/dev/usb/uhci_pci.c#3 (text+ko) ====

@@ -34,7 +34,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.45 2003/02/28 13:21:17 imp Exp $
+ * $FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.46 2003/05/06 19:30:41 jhb Exp $
  */
 
 /* Universal Host Controller Interface
@@ -114,6 +114,18 @@
 #define PCI_UHCI_DEVICEID_ICH4_C	0x24c78086
 static const char *uhci_device_ich4_c = "Intel 82801DB (ICH4) USB controller USB-C";
 
+#define PCI_UHCI_DEVICEID_ICH5_A	0x24d28086
+static const char *uhci_device_ich5_a = "Intel 82801EB (ICH5) USB controller USB-A";
+
+#define PCI_UHCI_DEVICEID_ICH5_B	0x24d48086
+static const char *uhci_device_ich5_b = "Intel 82801EB (ICH5) USB controller USB-B";
+
+#define PCI_UHCI_DEVICEID_ICH5_C	0x24d78086
+static const char *uhci_device_ich5_c = "Intel 82801EB (ICH5) USB controller USB-C";
+
+#define PCI_UHCI_DEVICEID_ICH5_D	0x24de8086
+static const char *uhci_device_ich5_d = "Intel 82801EB (ICH5) USB controller USB-D";
+
 #define PCI_UHCI_DEVICEID_440MX		0x719a8086
 static const char *uhci_device_440mx = "Intel 82443MX USB controller";
 
@@ -188,6 +200,14 @@
 		return (uhci_device_ich4_b);
 	} else if (device_id == PCI_UHCI_DEVICEID_ICH4_C) {
 		return (uhci_device_ich4_c);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH5_A) {
+		return (uhci_device_ich5_a);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH5_B) {
+		return (uhci_device_ich5_b);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH5_C) {
+		return (uhci_device_ich5_c);
+	} else if (device_id == PCI_UHCI_DEVICEID_ICH5_D) {
+		return (uhci_device_ich5_d);
 	} else if (device_id == PCI_UHCI_DEVICEID_440MX) {
 		return (uhci_device_440mx);
 	} else if (device_id == PCI_UHCI_DEVICEID_460GX) {

==== //depot/projects/smpng/sys/geom/geom_bsd.c#30 (text+ko) ====

@@ -32,7 +32,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/geom/geom_bsd.c,v 1.59 2003/05/05 08:30:59 phk Exp $
+ * $FreeBSD: src/sys/geom/geom_bsd.c,v 1.60 2003/05/06 19:36:13 phk Exp $
  *
  * This is the method for dealing with BSD disklabels.  It has been
  * extensively (by my standards at least) commented, in the vain hope that
@@ -142,10 +142,10 @@
 			rawoffset = 0;
 	}
 	
-	if (rawoffset != 0 && (off_t)rawoffset * dl.d_secsize != ms->mbroffset)
+	if (rawoffset != 0 && (off_t)rawoffset != ms->mbroffset)
 		printf("WARNING: Expected rawoffset %jd, found %jd\n",
 		    (intmax_t)ms->mbroffset/dl.d_secsize,
-		    (intmax_t)ms->rawoffset);
+		    (intmax_t)rawoffset/dl.d_secsize);
 
 	/* Don't munge open partitions. */
 	for (i = 0; i < dl.d_npartitions; i++) {

==== //depot/projects/smpng/sys/geom/geom_io.c#20 (text+ko) ====

@@ -32,7 +32,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/geom/geom_io.c,v 1.41 2003/05/02 12:36:12 phk Exp $
+ * $FreeBSD: src/sys/geom/geom_io.c,v 1.42 2003/05/07 05:37:31 phk Exp $
  */
 
 
@@ -283,7 +283,8 @@
 	pp->nend++;
 
 	if (error == ENOMEM) {
-		printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name);
+		if (bootverbose)
+			printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name);
 		g_io_request(bp, cp);
 		pace++;
 		return;

==== //depot/projects/smpng/sys/i386/isa/intr_machdep.c#19 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)isa.c	7.2 (Berkeley) 5/13/91
- * $FreeBSD: src/sys/i386/isa/intr_machdep.c,v 1.74 2003/03/24 19:14:46 mdodd Exp $
+ * $FreeBSD: src/sys/i386/isa/intr_machdep.c,v 1.75 2003/05/07 17:21:38 jhb Exp $
  */
 
 #include "opt_auto_eoi.h"
@@ -309,7 +309,8 @@
 /*
  *  ICU reinitialize when ICU configuration has lost.
  */
-void icu_reinit()
+void
+icu_reinit()
 {
 	int i;
 	register_t crit;
@@ -349,7 +350,8 @@
 /* 
  *initialize 8259's
  */
-static void init_i8259()
+static void
+init_i8259()
 {
 
 #ifdef DEV_MCA

==== //depot/projects/smpng/sys/kern/kern_sig.c#65 (text+ko) ====

@@ -36,40 +36,40 @@
  * SUCH DAMAGE.
  *
  *	@(#)kern_sig.c	8.7 (Berkeley) 4/18/94
- * $FreeBSD: src/sys/kern/kern_sig.c,v 1.233 2003/04/30 19:45:13 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_sig.c,v 1.236 2003/05/05 21:26:25 jhb Exp $
  */
 
 #include "opt_compat.h"
 #include "opt_ktrace.h"
 
 #include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/sysproto.h>
 #include <sys/systm.h>
 #include <sys/signalvar.h>
-#include <sys/namei.h>
 #include <sys/vnode.h>
+#include <sys/acct.h>
+#include <sys/condvar.h>
 #include <sys/event.h>
-#include <sys/proc.h>
-#include <sys/pioctl.h>
-#include <sys/acct.h>
 #include <sys/fcntl.h>
-#include <sys/condvar.h>
+#include <sys/kernel.h>
+#include <sys/ktr.h>
+#include <sys/ktrace.h>
 #include <sys/lock.h>
+#include <sys/malloc.h>
 #include <sys/mutex.h>
-#include <sys/wait.h>
-#include <sys/ktr.h>
-#include <sys/ktrace.h>
+#include <sys/namei.h>
+#include <sys/proc.h>
+#include <sys/pioctl.h>
 #include <sys/resourcevar.h>
 #include <sys/smp.h>
 #include <sys/stat.h>
 #include <sys/sx.h>
 #include <sys/syscallsubr.h>
+#include <sys/sysctl.h>
+#include <sys/sysent.h>
 #include <sys/syslog.h>
-#include <sys/sysent.h>
-#include <sys/sysctl.h>
-#include <sys/malloc.h>
+#include <sys/sysproto.h>
 #include <sys/unistd.h>
+#include <sys/wait.h>
 
 #include <machine/cpu.h>
 
@@ -82,6 +82,7 @@
 static int	coredump(struct thread *);
 static char	*expand_name(const char *, uid_t, pid_t);
 static int	killpg1(struct thread *td, int sig, int pgid, int all);
+static int	issignal(struct thread *p);
 static int	sigprop(int sig);
 static void	stop(struct proc *);
 static void	tdsigwakeup(struct thread *td, int sig, sig_t action);
@@ -731,9 +732,11 @@
 
 	error = copyout(&info.si_signo, uap->sig, sizeof(info.si_signo));
 	/* Repost if we got an error. */
-	if (error && info.si_signo)
+	if (error && info.si_signo) {
+		PROC_LOCK(td->td_proc);
 		tdsignal(td, info.si_signo);
-
+		PROC_UNLOCK(td->td_proc);
+	}
 	return (error);
 }
 /*
@@ -767,9 +770,11 @@
 
 	error = copyout(&info, uap->info, sizeof(info));
 	/* Repost if we got an error. */
-	if (error && info.si_signo)
+	if (error && info.si_signo) {
+		PROC_LOCK(td->td_proc);
 		tdsignal(td, info.si_signo);
-
+		PROC_UNLOCK(td->td_proc);
+	}
 	return (error);
 }
 
@@ -793,9 +798,11 @@
 
 	error = copyout(&info, uap->info, sizeof(info));
 	/* Repost if we got an error. */
-	if (error && info.si_signo)
+	if (error && info.si_signo) {
+		PROC_LOCK(td->td_proc);
 		tdsignal(td, info.si_signo);
-
+		PROC_UNLOCK(td->td_proc);
+	}
 	return (error);
 }
 
@@ -1886,7 +1893,7 @@
  *	while (sig = cursig(curthread))
  *		postsig(sig);
  */
-int
+static int
 issignal(td)
 	struct thread *td;
 {

==== //depot/projects/smpng/sys/kern/kern_subr.c#23 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)kern_subr.c	8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/kern/kern_subr.c,v 1.73 2003/03/25 20:13:24 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_subr.c,v 1.74 2003/05/05 21:27:29 jhb Exp $
  */
 
 #include "opt_zero.h"
@@ -185,9 +185,9 @@
 		n -= cnt;
 	}
 out:
-	if (td) {
+	if (td && save == 0) {
 		mtx_lock_spin(&sched_lock);
-		td->td_flags = (td->td_flags & ~TDF_DEADLKTREAT) | save;
+		td->td_flags &= ~TDF_DEADLKTREAT;
 		mtx_unlock_spin(&sched_lock);
 	}
 	return (error);

==== //depot/projects/smpng/sys/kern/kern_synch.c#48 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)kern_synch.c	8.9 (Berkeley) 5/19/95
- * $FreeBSD: src/sys/kern/kern_synch.c,v 1.220 2003/05/01 17:05:24 jhb Exp $
+ * $FreeBSD: src/sys/kern/kern_synch.c,v 1.221 2003/05/05 21:12:36 jhb Exp $
  */
 
 #include "opt_ddb.h"
@@ -467,9 +467,7 @@
 	p = td->td_proc;		/* XXX */
 	KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code"));
 #ifdef INVARIANTS
-	if (!TD_ON_LOCK(td) &&
-	    !TD_ON_RUNQ(td) &&
-	    !TD_IS_RUNNING(td))
+	if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td))
 		mtx_assert(&Giant, MA_NOTOWNED);
 #endif
 	KASSERT(td->td_critnest == 1,

==== //depot/projects/smpng/sys/kern/uipc_syscalls.c#33 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)uipc_syscalls.c	8.4 (Berkeley) 2/21/94
- * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.145 2003/03/31 06:25:42 alc Exp $
+ * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.146 2003/05/05 20:33:37 dwmalone Exp $
  */
 
 #include "opt_compat.h"
@@ -619,47 +619,18 @@
 	register struct msghdr *mp;
 	int flags;
 {
-	struct uio auio;
-	register struct iovec *iov;
-	register int i;
 	struct mbuf *control;
-	struct sockaddr *to = NULL;
-	int len, error;
-	struct socket *so;
-#ifdef KTRACE
-	struct iovec *ktriov = NULL;
-	struct uio ktruio;
-	int iovlen;
-#endif
+	struct sockaddr *to;
+	int error;
 
-	if ((error = fgetsock(td, s, &so, NULL)) != 0)
-		return (error);
-
-#ifdef MAC
-	error = mac_check_socket_send(td->td_ucred, so);
-	if (error)
-		goto bad;
-#endif
-
-	auio.uio_iov = mp->msg_iov;
-	auio.uio_iovcnt = mp->msg_iovlen;
-	auio.uio_segflg = UIO_USERSPACE;
-	auio.uio_rw = UIO_WRITE;
-	auio.uio_td = td;
-	auio.uio_offset = 0;			/* XXX */
-	auio.uio_resid = 0;
-	iov = mp->msg_iov;
-	for (i = 0; i < mp->msg_iovlen; i++, iov++) {
-		if ((auio.uio_resid += iov->iov_len) < 0) {
-			error = EINVAL;
-			goto bad;
-		}
-	}
-	if (mp->msg_name) {
+	if (mp->msg_name != NULL) {
 		error = getsockaddr(&to, mp->msg_name, mp->msg_namelen);
 		if (error)
-			goto bad;
-	}
+			return error;
+		mp->msg_name = to;
+	} else
+		to = NULL;
+
 	if (mp->msg_control) {
 		if (mp->msg_controllen < sizeof(struct cmsghdr)
 #ifdef COMPAT_OLDSOCK
@@ -690,7 +661,59 @@
 		}
 #endif
 	} else {
-		control = 0;
+		control = NULL;
+	}
+
+	error = kern_sendit(td, s, mp, flags, control);
+
+bad:
+	if (to)
+		FREE(to, M_SONAME);
+	return (error);
+}
+
+int
+kern_sendit(td, s, mp, flags, control)
+	struct thread *td;
+	int s;
+	struct msghdr *mp;
+	int flags;
+	struct mbuf *control;
+{
+	struct uio auio;
+	struct iovec *iov;
+	struct socket *so;
+	int i;
+	int len, error;
+#ifdef KTRACE
+	struct iovec *ktriov = NULL;
+	struct uio ktruio;
+	int iovlen;
+#endif
+
+	mtx_lock(&Giant);
+	if ((error = fgetsock(td, s, &so, NULL)) != 0)
+		goto bad2;
+
+#ifdef MAC
+	error = mac_check_socket_send(td->td_ucred, so);
+	if (error)
+		goto bad;
+#endif
+
+	auio.uio_iov = mp->msg_iov;
+	auio.uio_iovcnt = mp->msg_iovlen;
+	auio.uio_segflg = UIO_USERSPACE;
+	auio.uio_rw = UIO_WRITE;
+	auio.uio_td = td;
+	auio.uio_offset = 0;			/* XXX */
+	auio.uio_resid = 0;
+	iov = mp->msg_iov;
+	for (i = 0; i < mp->msg_iovlen; i++, iov++) {
+		if ((auio.uio_resid += iov->iov_len) < 0) {
+			error = EINVAL;
+			goto bad;
+		}
 	}
 #ifdef KTRACE
 	if (KTRPOINT(td, KTR_GENIO)) {
@@ -701,8 +724,8 @@
 	}
 #endif
 	len = auio.uio_resid;
-	error = so->so_proto->pr_usrreqs->pru_sosend(so, to, &auio, 0, control,
-						     flags, td);
+	error = so->so_proto->pr_usrreqs->pru_sosend(so, mp->msg_name, &auio,
+	    0, control, flags, td);
 	if (error) {
 		if (auio.uio_resid != len && (error == ERESTART ||
 		    error == EINTR || error == EWOULDBLOCK))
@@ -728,8 +751,8 @@
 #endif
 bad:
 	fputsock(so);
-	if (to)
-		FREE(to, M_SONAME);
+bad2:
+	mtx_unlock(&Giant);
 	return (error);
 }
 
@@ -762,9 +785,7 @@
 #endif
 	aiov.iov_base = uap->buf;
 	aiov.iov_len = uap->len;
-	mtx_lock(&Giant);
 	error = sendit(td, uap->s, &msg, uap->flags);
-	mtx_unlock(&Giant);
 	return (error);
 }
 
@@ -794,9 +815,7 @@
 	aiov.iov_len = uap->len;
 	msg.msg_control = 0;
 	msg.msg_flags = 0;
-	mtx_lock(&Giant);
 	error = sendit(td, uap->s, &msg, uap->flags);
-	mtx_unlock(&Giant);
 	return (error);
 }
 
@@ -816,7 +835,6 @@
 	struct iovec aiov[UIO_SMALLIOV], *iov;
 	int error;
 
-	mtx_lock(&Giant);
 	error = copyin(uap->msg, &msg, sizeof (struct omsghdr));
 	if (error)
 		goto done2;
@@ -842,7 +860,6 @@
 	if (iov != aiov)
 		FREE(iov, M_IOV);
 done2:
-	mtx_unlock(&Giant);
 	return (error);
 }
 #endif
@@ -863,7 +880,6 @@
 	struct iovec aiov[UIO_SMALLIOV], *iov;
 	int error;
 
-	mtx_lock(&Giant);
 	error = copyin(uap->msg, &msg, sizeof (msg));
 	if (error)
 		goto done2;
@@ -891,7 +907,6 @@
 	if (iov != aiov)
 		FREE(iov, M_IOV);
 done2:
-	mtx_unlock(&Giant);
 	return (error);
 }
 

==== //depot/projects/smpng/sys/kern/vfs_default.c#20 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *
- * $FreeBSD: src/sys/kern/vfs_default.c,v 1.83 2003/05/02 19:33:21 alc Exp $
+ * $FreeBSD: src/sys/kern/vfs_default.c,v 1.84 2003/05/06 02:45:28 alc Exp $
  */
 
 #include <sys/param.h>
@@ -657,11 +657,11 @@
 		else
 			VM_OBJECT_UNLOCK(obj);
 	} else {
-		VM_OBJECT_UNLOCK(obj);
 		/*
 		 * Woe to the process that tries to page now :-).
 		 */
 		vm_pager_deallocate(obj);
+		VM_OBJECT_UNLOCK(obj);
 	}
 	return (0);
 }

==== //depot/projects/smpng/sys/netinet/ip_input.c#34 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)ip_input.c	8.2 (Berkeley) 1/4/94
- * $FreeBSD: src/sys/netinet/ip_input.c,v 1.236 2003/04/29 21:36:18 mdodd Exp $
+ * $FreeBSD: src/sys/netinet/ip_input.c,v 1.237 2003/05/06 20:34:04 rwatson Exp $
  */
 
 #include "opt_bootp.h"
@@ -1797,13 +1797,10 @@
 		mcopy->m_len = imin((ip->ip_hl << 2) + 8,
 		    (int)ip->ip_len);
 		m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t));
-#ifdef MAC
 		/*
-		 * XXXMAC: This will eventually become an explicit
-		 * labeling point.
+		 * XXXMAC: Eventually, we may have an explict labeling
+		 * point here.
 		 */
-		mac_create_mbuf_from_mbuf(m, mcopy);
-#endif
 	}
 
 #ifdef IPSTEALTH

==== //depot/projects/smpng/sys/netinet/tcp_input.c#33 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)tcp_input.c	8.12 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.204 2003/04/21 16:27:45 obrien Exp $
+ * $FreeBSD: src/sys/netinet/tcp_input.c,v 1.205 2003/05/07 05:26:27 rwatson Exp $
  */
 
 #include "opt_ipfw.h"		/* for ipfw_fwd		*/
@@ -2950,7 +2950,7 @@
 	 */
 	if (thflags != TH_ACK || tlen != 0 || 
 	    th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt)
-		tcp_twrespond(tw, TH_ACK);
+		tcp_twrespond(tw, NULL, m, TH_ACK);
 	goto drop;
 
 reset:

==== //depot/projects/smpng/sys/netinet/tcp_subr.c#31 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)tcp_subr.c	8.2 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.159 2003/04/10 20:33:10 rwatson Exp $
+ * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.160 2003/05/07 05:26:27 rwatson Exp $
  */
 
 #include "opt_compat.h"
@@ -1661,13 +1661,13 @@
 	so->so_pcb = NULL;
 	tw->tw_cred = crhold(so->so_cred);
 	tw->tw_so_options = so->so_options;
+	if (acknow)
+		tcp_twrespond(tw, so, NULL, TH_ACK);
 	sotryfree(so);
 	inp->inp_socket = NULL;
 	inp->inp_ppcb = (caddr_t)tw;
 	inp->inp_vflag |= INP_TIMEWAIT;
 	tcp_timer_2msl_reset(tw, tw_time);
-	if (acknow)
-		tcp_twrespond(tw, TH_ACK);
 	INP_UNLOCK(inp);
 }
 
@@ -1693,8 +1693,13 @@
 	return (NULL);
 }
 
+/*
+ * One of so and msrc must be non-NULL for use by the MAC Framework to
+ * construct a label for ay resulting packet.
+ */
 int
-tcp_twrespond(struct tcptw *tw, int flags)
+tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
+    int flags)
 {
 	struct inpcb *inp = tw->tw_inpcb;
 	struct tcphdr *th;
@@ -1708,11 +1713,21 @@
 	int isipv6 = inp->inp_inc.inc_isipv6;
 #endif
 
+	KASSERT(so != NULL || msrc != NULL,
+	    ("tcp_twrespond: so and msrc NULL"));
+
 	m = m_gethdr(M_DONTWAIT, MT_HEADER);
 	if (m == NULL)
 		return (ENOBUFS);
 	m->m_data += max_linkhdr;
 
+#ifdef MAC
+	if (so != NULL)
+		mac_create_mbuf_from_socket(so, m);
+	else
+		mac_create_mbuf_netlayer(msrc, m);
+#endif
+
 #ifdef INET6
 	if (isipv6) {
 		hdrlen = sizeof(struct ip6_hdr) + sizeof(struct tcphdr);

==== //depot/projects/smpng/sys/netinet/tcp_var.h#14 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)tcp_var.h	8.4 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.88 2003/04/01 21:16:46 hsu Exp $
+ * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.89 2003/05/07 05:26:27 rwatson Exp $
  */
 
 #ifndef _NETINET_TCP_VAR_H_
@@ -491,7 +491,7 @@
 	 tcp_quench(struct inpcb *, int);
 void	 tcp_respond(struct tcpcb *, void *,
 	    struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int);
-int	 tcp_twrespond(struct tcptw *, int);
+int	 tcp_twrespond(struct tcptw *, struct socket *, struct mbuf *, int);
 struct rtentry *
 	 tcp_rtlookup(struct in_conninfo *);
 void	 tcp_setpersist(struct tcpcb *);

==== //depot/projects/smpng/sys/pci/if_sis.c#25 (text+ko) ====

@@ -29,7 +29,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/pci/if_sis.c,v 1.74 2003/04/21 18:34:04 imp Exp $
+ * $FreeBSD: src/sys/pci/if_sis.c,v 1.75 2003/05/06 02:00:01 cognet Exp $
  */
 
 /*
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/if_sis.c,v 1.74 2003/04/21 18:34:04 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/if_sis.c,v 1.75 2003/05/06 02:00:01 cognet Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1374,8 +1374,6 @@
 		goto fail;
 	}
 
-	callout_handle_init(&sc->sis_stat_ch);
-
 	/*
 	 * Call MI attach routine.
 	 */
@@ -1748,8 +1746,6 @@
 			sis_start(ifp);
 	}
 
-	sc->sis_stat_ch = timeout(sis_tick, sc, hz);
-
 	SIS_UNLOCK(sc);
 
 	return;

==== //depot/projects/smpng/sys/sys/dkstat.h#3 (text+ko) ====

@@ -36,12 +36,12 @@
  * SUCH DAMAGE.
  *
  *	@(#)dkstat.h	8.2 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/sys/dkstat.h,v 1.16 2003/02/16 14:15:03 phk Exp $
+ * $FreeBSD: src/sys/sys/dkstat.h,v 1.17 2003/05/07 15:26:43 phk Exp $
  */
 
 #ifndef _SYS_DKSTAT_H_
 #define _SYS_DKSTAT_H_ 1
 
-#warning "<sys/dkstat.h> is deprecated and should not be #include'd"
+#include <sys/resource.h>
 
 #endif /* _SYS_DKSTAT_H_ */

==== //depot/projects/smpng/sys/sys/signalvar.h#15 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)signalvar.h	8.6 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/signalvar.h,v 1.59 2003/04/30 19:57:21 jhb Exp $
+ * $FreeBSD: src/sys/sys/signalvar.h,v 1.60 2003/05/05 21:16:28 jhb Exp $
  */
 
 #ifndef _SYS_SIGNALVAR_H_
@@ -238,7 +238,6 @@
 int	cursig(struct thread *td);
 void	execsigs(struct proc *p);
 void	gsignal(int pgid, int sig);
-int	issignal(struct thread *p);
 void	killproc(struct proc *p, char *why);
 void	pgsigio(struct sigio **, int signum, int checkctty);
 void	pgsignal(struct pgrp *pgrp, int sig, int checkctty);

==== //depot/projects/smpng/sys/sys/syscallsubr.h#7 (text+ko) ====

@@ -22,7 +22,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.8 2003/05/05 09:22:58 mbr Exp $
+ * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.9 2003/05/05 20:33:38 dwmalone Exp $
  */
 
 #ifndef _SYS_SYSCALLSUBR_H_
@@ -32,6 +32,8 @@
 #include <sys/uio.h>
 
 struct sockaddr;
+struct msghdr;
+struct mbuf;
 
 int	kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg,
 	    u_int buflen);
@@ -70,6 +72,8 @@
 int	kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg);
 int	kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou,
 	    fd_set *fd_ex, struct timeval *tvp);
+int	kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags,
+	    struct mbuf *control);
 int	kern_shmat(struct thread *td, int shmid, const void *shmaddr,
 	    int shmflg, int wantrem);
 int	kern_shmctl(struct thread *td, int shmid, int cmd, void *buf,

==== //depot/projects/smpng/sys/vm/swap_pager.c#26 (text+ko) ====

@@ -64,7 +64,7 @@
  *
  *	@(#)swap_pager.c	8.9 (Berkeley) 3/21/94
  *
- * $FreeBSD: src/sys/vm/swap_pager.c,v 1.194 2003/04/28 17:13:53 alc Exp $
+ * $FreeBSD: src/sys/vm/swap_pager.c,v 1.195 2003/05/06 02:45:28 alc Exp $
  */
 
 #include <sys/param.h>
@@ -428,9 +428,8 @@
 	}
 	mtx_unlock(&sw_alloc_mtx);
 
-	VM_OBJECT_LOCK(object);
+	VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
 	vm_object_pip_wait(object, "swpdea");
-	VM_OBJECT_UNLOCK(object);
 
 	/*
 	 * Free all remaining metadata.  We only bother to free it from 

==== //depot/projects/smpng/sys/vm/vm_object.c#34 (text+ko) ====

@@ -61,7 +61,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/vm/vm_object.c,v 1.285 2003/05/04 19:23:40 alc Exp $
+ * $FreeBSD: src/sys/vm/vm_object.c,v 1.286 2003/05/06 02:45:28 alc Exp $
  */
 
 /*
@@ -600,12 +600,12 @@
 	}
 	vm_page_unlock_queues();
 	splx(s);
-	VM_OBJECT_UNLOCK(object);
 
 	/*
 	 * Let the pager know object is dead.
 	 */
 	vm_pager_deallocate(object);
+	VM_OBJECT_UNLOCK(object);
 
 	/*
 	 * Remove the object from the global object list.

==== //depot/projects/smpng/sys/vm/vm_pager.c#12 (text+ko) ====

@@ -61,7 +61,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/vm/vm_pager.c,v 1.85 2003/04/05 21:01:16 alc Exp $
+ * $FreeBSD: src/sys/vm/vm_pager.c,v 1.86 2003/05/06 02:45:28 alc Exp $
  */
 
 /*
@@ -256,10 +256,15 @@
 	return (ret);
 }
 
+/*
+ *	The object must be locked.
+ */
 void
 vm_pager_deallocate(object)
 	vm_object_t object;
 {
+
+	VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
 	(*pagertab[object->type]->pgo_dealloc) (object);
 }
 

==== //depot/projects/smpng/sys/vm/vnode_pager.c#30 (text+ko) ====

@@ -38,7 +38,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)vnode_pager.c	7.5 (Berkeley) 4/20/91
- * $FreeBSD: src/sys/vm/vnode_pager.c,v 1.172 2003/04/26 18:33:18 alc Exp $
+ * $FreeBSD: src/sys/vm/vnode_pager.c,v 1.173 2003/05/06 02:45:28 alc Exp $
  */
 
 /*
@@ -175,19 +175,20 @@
 	return (object);
 }

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305071806.h47I69hs051243>