Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys revert the removal of struct lwp * parameter from bind, ...
details: https://anonhg.NetBSD.org/src/rev/b26afa944f8f
branches: trunk
changeset: 331187:b26afa944f8f
user: rtr <rtr%NetBSD.org@localhost>
date: Tue Aug 05 05:24:26 2014 +0000
description:
revert the removal of struct lwp * parameter from bind, listen and connect
user requests.
this should resolve the issue relating to nfs client hangs presented
recently by wiz on current-users@
diffstat:
sys/kern/uipc_socket.c | 10 +++++-----
sys/kern/uipc_usrreq.c | 18 +++++++++---------
sys/net/link_proto.c | 16 ++++++++--------
sys/net/raw_usrreq.c | 6 +++---
sys/net/rtsock.c | 10 +++++-----
sys/netatalk/ddp_usrreq.c | 10 +++++-----
sys/netbt/hci_socket.c | 10 +++++-----
sys/netbt/l2cap_socket.c | 10 +++++-----
sys/netbt/rfcomm_socket.c | 10 +++++-----
sys/netbt/sco_socket.c | 10 +++++-----
sys/netinet/in_pcb.c | 12 ++++++------
sys/netinet/in_pcb.h | 4 ++--
sys/netinet/raw_ip.c | 10 +++++-----
sys/netinet/tcp_usrreq.c | 26 +++++++++++++-------------
sys/netinet/udp_usrreq.c | 14 +++++++-------
sys/netinet6/in6_pcb.c | 12 ++++++------
sys/netinet6/in6_pcb.h | 4 ++--
sys/netinet6/raw_ip6.c | 10 +++++-----
sys/netinet6/udp6_usrreq.c | 14 +++++++-------
sys/netipsec/keysock.c | 10 +++++-----
sys/netmpls/mpls_proto.c | 10 +++++-----
sys/netnatm/natm.c | 10 +++++-----
sys/rump/net/lib/libsockin/sockin.c | 16 ++++++++--------
sys/sys/protosw.h | 22 ++++++++++++----------
sys/sys/un.h | 4 ++--
25 files changed, 145 insertions(+), 143 deletions(-)
diffs (truncated from 1199 to 300 lines):
diff -r 5674ed3ee80d -r b26afa944f8f sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/kern/uipc_socket.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.230 2014/07/31 20:28:59 mrg Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.231 2014/08/05 05:24:26 rtr Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.230 2014/07/31 20:28:59 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.231 2014/08/05 05:24:26 rtr Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -629,7 +629,7 @@
int error;
solock(so);
- error = (*so->so_proto->pr_usrreqs->pr_bind)(so, nam);
+ error = (*so->so_proto->pr_usrreqs->pr_bind)(so, nam, l);
sounlock(so);
return error;
}
@@ -645,7 +645,7 @@
sounlock(so);
return EINVAL;
}
- error = (*so->so_proto->pr_usrreqs->pr_listen)(so);
+ error = (*so->so_proto->pr_usrreqs->pr_listen)(so, l);
if (error != 0) {
sounlock(so);
return error;
@@ -826,7 +826,7 @@
(error = sodisconnect(so))))
error = EISCONN;
else
- error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam);
+ error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l);
return error;
}
diff -r 5674ed3ee80d -r b26afa944f8f sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/kern/uipc_usrreq.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.164 2014/07/31 14:12:57 rtr Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.165 2014/08/05 05:24:26 rtr Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.164 2014/07/31 14:12:57 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.165 2014/08/05 05:24:26 rtr Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -495,7 +495,7 @@
* intervening control ops, like
* another connection.
*/
- error = unp_connect(so, nam);
+ error = unp_connect(so, nam, l);
}
} else {
if ((so->so_state & SS_ISCONNECTED) == 0)
@@ -920,7 +920,7 @@
}
static int
-unp_bind(struct socket *so, struct mbuf *nam)
+unp_bind(struct socket *so, struct mbuf *nam, struct lwp *l)
{
struct sockaddr_un *sun;
struct unpcb *unp;
@@ -950,7 +950,7 @@
unp->unp_flags |= UNP_BUSY;
sounlock(so);
- p = curlwp->l_proc;
+ p = l->l_proc;
sun = makeun(nam, &addrlen);
pb = pathbuf_create(sun->sun_path);
@@ -994,8 +994,8 @@
unp->unp_addrlen = addrlen;
unp->unp_addr = sun;
unp->unp_connid.unp_pid = p->p_pid;
- unp->unp_connid.unp_euid = kauth_cred_geteuid(curlwp->l_cred);
- unp->unp_connid.unp_egid = kauth_cred_getegid(curlwp->l_cred);
+ unp->unp_connid.unp_euid = kauth_cred_geteuid(l->l_cred);
+ unp->unp_connid.unp_egid = kauth_cred_getegid(l->l_cred);
unp->unp_flags |= UNP_EIDSBIND;
VOP_UNLOCK(vp);
vput(nd.ni_dvp);
@@ -1011,7 +1011,7 @@
}
static int
-unp_listen(struct socket *so)
+unp_listen(struct socket *so, struct lwp *l)
{
struct unpcb *unp = sotounpcb(so);
@@ -1064,7 +1064,7 @@
}
int
-unp_connect(struct socket *so, struct mbuf *nam)
+unp_connect(struct socket *so, struct mbuf *nam, struct lwp *l)
{
struct sockaddr_un *sun;
vnode_t *vp;
diff -r 5674ed3ee80d -r b26afa944f8f sys/net/link_proto.c
--- a/sys/net/link_proto.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/net/link_proto.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: link_proto.c,v 1.20 2014/07/31 13:21:33 rtr Exp $ */
+/* $NetBSD: link_proto.c,v 1.21 2014/08/05 05:24:26 rtr Exp $ */
/*-
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.20 2014/07/31 13:21:33 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.21 2014/08/05 05:24:26 rtr Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -51,9 +51,9 @@
static int link_attach(struct socket *, int);
static void link_detach(struct socket *);
static int link_accept(struct socket *, struct mbuf *);
-static int link_bind(struct socket *, struct mbuf *);
-static int link_listen(struct socket *);
-static int link_connect(struct socket *, struct mbuf *);
+static int link_bind(struct socket *, struct mbuf *, struct lwp *);
+static int link_listen(struct socket *, struct lwp *);
+static int link_connect(struct socket *, struct mbuf *, struct lwp *);
static int link_disconnect(struct socket *);
static int link_shutdown(struct socket *);
static int link_abort(struct socket *);
@@ -265,7 +265,7 @@
}
static int
-link_bind(struct socket *so, struct mbuf *nam)
+link_bind(struct socket *so, struct mbuf *nam, struct lwp *l)
{
KASSERT(solocked(so));
@@ -273,7 +273,7 @@
}
static int
-link_listen(struct socket *so)
+link_listen(struct socket *so, struct lwp *l)
{
KASSERT(solocked(so));
@@ -281,7 +281,7 @@
}
static int
-link_connect(struct socket *so, struct mbuf *nam)
+link_connect(struct socket *so, struct mbuf *nam, struct lwp *l)
{
KASSERT(solocked(so));
diff -r 5674ed3ee80d -r b26afa944f8f sys/net/raw_usrreq.c
--- a/sys/net/raw_usrreq.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/net/raw_usrreq.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: raw_usrreq.c,v 1.48 2014/07/31 05:13:53 rtr Exp $ */
+/* $NetBSD: raw_usrreq.c,v 1.49 2014/08/05 05:24:26 rtr Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.48 2014/07/31 05:13:53 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.49 2014/08/05 05:24:26 rtr Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -216,7 +216,7 @@
error = EISCONN;
goto die;
}
- error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam);
+ error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l);
if (error) {
die:
m_freem(m);
diff -r 5674ed3ee80d -r b26afa944f8f sys/net/rtsock.c
--- a/sys/net/rtsock.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/net/rtsock.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.159 2014/07/31 03:39:35 rtr Exp $ */
+/* $NetBSD: rtsock.c,v 1.160 2014/08/05 05:24:26 rtr Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.159 2014/07/31 03:39:35 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.160 2014/08/05 05:24:26 rtr Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -234,7 +234,7 @@
}
static int
-COMPATNAME(route_bind)(struct socket *so, struct mbuf *nam)
+COMPATNAME(route_bind)(struct socket *so, struct mbuf *nam, struct lwp *l)
{
KASSERT(solocked(so));
@@ -242,7 +242,7 @@
}
static int
-COMPATNAME(route_listen)(struct socket *so)
+COMPATNAME(route_listen)(struct socket *so, struct lwp *l)
{
KASSERT(solocked(so));
@@ -250,7 +250,7 @@
}
static int
-COMPATNAME(route_connect)(struct socket *so, struct mbuf *nam)
+COMPATNAME(route_connect)(struct socket *so, struct mbuf *nam, struct lwp *l)
{
KASSERT(solocked(so));
diff -r 5674ed3ee80d -r b26afa944f8f sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/netatalk/ddp_usrreq.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ddp_usrreq.c,v 1.57 2014/07/31 03:39:35 rtr Exp $ */
+/* $NetBSD: ddp_usrreq.c,v 1.58 2014/08/05 05:24:26 rtr Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.57 2014/07/31 03:39:35 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.58 2014/08/05 05:24:26 rtr Exp $");
#include "opt_mbuftrace.h"
@@ -452,7 +452,7 @@
}
static int
-ddp_bind(struct socket *so, struct mbuf *nam)
+ddp_bind(struct socket *so, struct mbuf *nam, struct lwp *l)
{
KASSERT(solocked(so));
KASSERT(sotoddpcb(so) != NULL);
@@ -461,7 +461,7 @@
}
static int
-ddp_listen(struct socket *so)
+ddp_listen(struct socket *so, struct lwp *l)
{
KASSERT(solocked(so));
@@ -469,7 +469,7 @@
}
static int
-ddp_connect(struct socket *so, struct mbuf *nam)
+ddp_connect(struct socket *so, struct mbuf *nam, struct lwp *l)
{
struct ddpcb *ddp = sotoddpcb(so);
int error = 0;
diff -r 5674ed3ee80d -r b26afa944f8f sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c Tue Aug 05 04:29:01 2014 +0000
+++ b/sys/netbt/hci_socket.c Tue Aug 05 05:24:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hci_socket.c,v 1.36 2014/07/31 03:39:35 rtr Exp $ */
+/* $NetBSD: hci_socket.c,v 1.37 2014/08/05 05:24:26 rtr Exp $ */
Home |
Main Index |
Thread Index |
Old Index