Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/uipc_socket.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/kern/uipc_socket.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.159.2.2 retrieving revision 1.163 diff -u -p -r1.159.2.2 -r1.163 --- src/sys/kern/uipc_socket.c 2008/06/04 02:05:40 1.159.2.2 +++ src/sys/kern/uipc_socket.c 2008/04/29 17:35:31 1.163 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.159.2.2 2008/06/04 02:05:40 yamt Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.163 2008/04/29 17:35:31 ad Exp $ */ /*- * Copyright (c) 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -63,13 +63,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.159.2.2 2008/06/04 02:05:40 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.163 2008/04/29 17:35:31 ad Exp $"); #include "opt_sock_counters.h" #include "opt_sosend_loan.h" #include "opt_mbuftrace.h" #include "opt_somaxkva.h" -#include "opt_multiprocessor.h" /* XXX */ #include #include @@ -128,7 +127,7 @@ EVCNT_ATTACH_STATIC(sosend_kvalimit); static struct callback_entry sokva_reclaimerentry; -#if defined(SOSEND_NO_LOAN) || defined(MULTIPROCESSOR) +#ifdef SOSEND_NO_LOAN int sock_loan_thresh = -1; #else int sock_loan_thresh = 4096; @@ -436,7 +435,6 @@ soinit(void) mutex_init(&so_pendfree_lock, MUTEX_DEFAULT, IPL_VM); softnet_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NONE); cv_init(&socurkva_cv, "sokva"); - soinit2(); /* Set the initial adjusted socket buffer size. */ if (sb_max_set(sb_max)) @@ -710,10 +708,12 @@ soabort(struct socket *so) error = (*so->so_proto->pr_usrreq)(so, PRU_ABORT, NULL, NULL, NULL, NULL); refs = --so->so_aborting; /* XXX */ - if (error || (refs == 0)) { + if (error) { sofree(so); } else { sounlock(so); + if (refs == 0) + sofree(so); } return error; } @@ -852,7 +852,8 @@ sosend(struct socket *so, struct mbuf *a dontroute = (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 && (so->so_proto->pr_flags & PR_ATOMIC); - l->l_ru.ru_msgsnd++; + if (l) + l->l_ru.ru_msgsnd++; if (control) clen = control->m_len; restart: